# Log Files are Big

**URL:** <https://forum.mautic.org/t/log-files-are-big/2631>\
**Category:** General Discussion\
**Created:** [October 27, 2015, 3:43pm UTC](https://forum.mautic.org/t/log-files-are-big/2631 "2015-10-27T15:43:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![healthstatus](https://avatars.discourse-cdn.com/v4/letter/h/9f8e36/32.png) [@healthstatus](https://forum.mautic.org/u/healthstatus)\
**Post date:** [October 27, 2015, 3:43pm UTC](https://forum.mautic.org/t/log-files-are-big/2631/1 "2015-10-27T15:43:29Z")

</div>

My log files are big. Yesterday’s was 65mb. The majority are this:  
  
[2015-10-27 15:34:57] mautic.CRITICAL: Uncaught PHP Exception LogicException: “The controller must return a response (null given). Did you forget to add a return statement somewhere in your controller?” at //app/bootstrap.php.cache line 3063 {“exception”:"[object] (LogicException(code: 0): The controller must return a response (null given). Did you forget to add a return statement somewhere in your controller? at //app/bootstrap.php.cache:3063)"} []  
  
[2015-10-27 15:34:58] mautic.WARNING: PHP Warning: Cannot modify header information - headers already sent by (output started at //app/bootstrap.php.cache:1785) - in file //app/bundles/CoreBundle/Helper/CookieHelper.php - at line 61 [] []  
  
  
  
A) What is causing these errors?  
  
 ![B)]( "B)") Can I control logging to only show critical errors?  
  
C) Can I set Mautic to delete logs after 3 days instead of 7?

---

<div class="post-metadata">

**Author:** ![healthstatus](https://avatars.discourse-cdn.com/v4/letter/h/9f8e36/32.png) [@healthstatus](https://forum.mautic.org/u/healthstatus)\
**Post date:** [October 27, 2015, 3:43pm UTC](https://forum.mautic.org/t/log-files-are-big/2631/2 "2015-10-27T15:43:29Z")

</div>

My log files are big. Yesterday’s was 65mb. The majority are this:  
[2015-10-27 15:34:57] mautic.CRITICAL: Uncaught PHP Exception LogicException: “The controller must return a response (null given). Did you forget to add a return statement somewhere in your controller?” at //app/bootstrap.php.cache line 3063 {“exception”:"[object] (LogicException(code: 0): The controller must return a response (null given). Did you forget to add a return statement somewhere in your controller? at //app/bootstrap.php.cache:3063)"} []  
[2015-10-27 15:34:58] mautic.WARNING: PHP Warning: Cannot modify header information - headers already sent by (output started at //app/bootstrap.php.cache:1785) - in file //app/bundles/CoreBundle/Helper/CookieHelper.php - at line 61 [] []

A) What is causing these errors?  
B) Can I control logging to only show critical errors?  
C) Can I set Mautic to delete logs after 3 days instead of 7?

---

<div class="post-metadata">

**Author:** ![kuzmany](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/kuzmany/32/390_2.png) [@kuzmany](https://forum.mautic.org/u/kuzmany)\
**Post date:** [October 27, 2015, 4:47pm UTC](https://forum.mautic.org/t/log-files-are-big/2631/3 "2015-10-27T16:47:49Z")

</div>

A) see issue and solution [https://github.com/mautic/mautic/issues/1049](https://github.com/mautic/mautic/issues/1049)

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [October 28, 2015, 10:14am UTC](https://forum.mautic.org/t/log-files-are-big/2631/4 "2015-10-28T10:14:41Z")

</div>

Mautic 1.2.2 should fix those errors. It was released yesterday. Could you tell us if it got better after update?

---

<div class="post-metadata">

**Author:** ![healthstatus](https://avatars.discourse-cdn.com/v4/letter/h/9f8e36/32.png) [@healthstatus](https://forum.mautic.org/u/healthstatus)\
**Post date:** [October 28, 2015, 1:46pm UTC](https://forum.mautic.org/t/log-files-are-big/2631/5 "2015-10-28T13:46:48Z")

</div>

I updated and didn’t see any immediate change, then went in and deleted all the cache files (you know it would be nice in the settings to have a button that flushed the cache for you), that seems to have slowed the messages down considerably. I will keep an eye on it today.

---

<div class="post-metadata">

**Author:** ![healthstatus](https://avatars.discourse-cdn.com/v4/letter/h/9f8e36/32.png) [@healthstatus](https://forum.mautic.org/u/healthstatus)\
**Post date:** [October 28, 2015, 1:58pm UTC](https://forum.mautic.org/t/log-files-are-big/2631/6 "2015-10-28T13:58:56Z")

</div>

I have run 1.2.2 with the cache cleared for about 20 minutes now and no new errors have hit the log, previously I was getting at least 1 per second. I would say that it is resolved.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [October 28, 2015, 2:07pm UTC](https://forum.mautic.org/t/log-files-are-big/2631/7 "2015-10-28T14:07:16Z")

</div>

Great to hear that. The button for clearing the cache is a good idea. It might get lost from the sight of developers. If you report it to [https://github.com/mautic/mautic/issues](https://github.com/mautic/mautic/issues), it won’t get lost.

---

<div class="post-metadata">

**Author:** ![healthstatus](https://avatars.discourse-cdn.com/v4/letter/h/9f8e36/32.png) [@healthstatus](https://forum.mautic.org/u/healthstatus)\
**Post date:** [October 28, 2015, 5:29pm UTC](https://forum.mautic.org/t/log-files-are-big/2631/8 "2015-10-28T17:29:55Z")

</div>

> [@4278:@escopecz](#):
>
> Great to hear that. The button for clearing the cache is a good idea. It might get lost from the sight of developers. If you report it to [Issues · mautic/mautic · GitHub](https://github.com/mautic/mautic/issues) , it won’t get lost.

done

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [October 29, 2015, 8:29am UTC](https://forum.mautic.org/t/log-files-are-big/2631/9 "2015-10-29T08:29:18Z")

</div>

Thanks. For others, the feature request is here: [https://github.com/mautic/mautic/issues/1086](https://github.com/mautic/mautic/issues/1086)

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:57pm UTC](https://forum.mautic.org/t/log-files-are-big/2631/10 "2020-02-02T22:57:25Z")

</div>


