Jump to content

uploads/logs folder too big. Can I just delete the files?


Recommended Posts

Hi guys,

I'm still with IPS 4.3.3 and finally planning to upgrade soon to the latest version. I'm using a dedicated server. And I try to clean a bit stuff on the server before doing the upgrade.
And I noticed something weird. That is why I need your help guys!

I noticed that the uploads/logs folder on the server is 24GB large! I have no idea why. It has 2700+ files. And many of them are 25+ MB each.

Here it is a list of the files generated today and yesterday:

Today
2021_10_08_javascript.php - 53KB 
2021_10_08_uncaught_exception.php - 28MB !
2021_10_08_dispatcher.php - 2kb

Yesterday
2021_10_07_uncaught_exception.php - 14MB
2021_10_07_topic_call.php - 1kb

And so on, basically every day there is a large uncaught_exception file generated with a size between 185MB and 5MB.

How can I get rid of these files? 
Anything I can do in the IPS admin panel? Or can I just delete all these exception files + others directly from the server?

Please advise!

Edited by estan
Link to comment
Share on other sites

Yes, you can safely delete the contents of that folder.

But the underlying issue is the number and size of those logs, and what is causing them.

From what you've described it sounds as though you may have a problem that isn't readily apparent.

Can you provide one or two entries from one of those logs (with any sensitive info redacted) if you don't recognize the cause of that error?

Link to comment
Share on other sites

Thank you very much for letting me know @Mark H! It is helpful to know that I can delete all the content of the folder fully.

Here are some entries in one of the exception files: 2021_10_07_uncaught_exception.php

Any further advice here?

Thu, 07 Oct 2021 01:02:48 +0000

IPS\Db\Exception: Too many connections (1040)
#0 /home/mysite/public_html/board/system/Db/Db.php(119): IPS\_Db::_establishConnection('IPS\\Db', Array, false)
#1 /home/mysite/public_html/board/system/Data/Cache/None.php(119): IPS\_Db::i()
#2 /home/mysite/public_html/board/system/Dispatcher/Front.php(424): IPS\Data\Cache\_None->getWithExpire('page_c68a64d368...', true)
#3 /home/mysite/public_html/board/system/Dispatcher/Front.php(38): IPS\Dispatcher\_Front->checkCached()
#4 /home/mysite/public_html/board/system/Dispatcher/Dispatcher.php(103): IPS\Dispatcher\_Front->init()
#5 /home/mysite/public_html/board/index.php(13): IPS\_Dispatcher::i()
#6 {main}
#0 /home/mysite/public_html/board/init.php(533): IPS\_Log::log('\nIPS\\Db\\Excepti...', 'uncaught_except...')
#1 [internal function]: IPS\IPS::exceptionHandler(Object(IPS\Db\Exception))
#2 {main}

-------------

Thu, 07 Oct 2021 01:02:48 +0000

IPS\Db\Exception: Too many connections (1040)
#0 /home/mysite/public_html/board/system/Db/Db.php(119): IPS\_Db::_establishConnection('IPS\\Db', Array, false)
#1 /home/mysite/public_html/board/system/Data/Cache/None.php(119): IPS\_Db::i()
#2 /home/mysite/public_html/board/system/Dispatcher/Front.php(424): IPS\Data\Cache\_None->getWithExpire('page_bfcf30f9ae...', true)
#3 /home/mysite/public_html/board/system/Dispatcher/Front.php(38): IPS\Dispatcher\_Front->checkCached()
#4 /home/mysite/public_html/board/system/Dispatcher/Dispatcher.php(103): IPS\Dispatcher\_Front->init()
#5 /home/mysite/public_html/board/index.php(13): IPS\_Dispatcher::i()
#6 {main}
#0 /home/mysite/public_html/board/init.php(533): IPS\_Log::log('\nIPS\\Db\\Excepti...', 'uncaught_except...')
#1 [internal function]: IPS\IPS::exceptionHandler(Object(IPS\Db\Exception))
#2 {main}

-------------

Thu, 07 Oct 2021 01:03:17 +0000

IPS\Db\Exception: Too many connections (1040)
#0 /home/mysite/public_html/board/system/Db/Db.php(119): IPS\_Db::_establishConnection('IPS\\Db', Array, false)
#1 /home/mysite/public_html/board/system/Data/Cache/None.php(119): IPS\_Db::i()
#2 /home/mysite/public_html/board/system/Dispatcher/Front.php(424): IPS\Data\Cache\_None->getWithExpire('page_5b623adba6...', true)
#3 /home/mysite/public_html/board/system/Dispatcher/Front.php(38): IPS\Dispatcher\_Front->checkCached()
#4 /home/mysite/public_html/board/system/Dispatcher/Dispatcher.php(103): IPS\Dispatcher\_Front->init()
#5 /home/mysite/public_html/board/index.php(13): IPS\_Dispatcher::i()
#6 {main}
#0 /home/mysite/public_html/board/init.php(533): IPS\_Log::log('\nIPS\\Db\\Excepti...', 'uncaught_except...')
#1 [internal function]: IPS\IPS::exceptionHandler(Object(IPS\Db\Exception))
#2 {main}

-------------

Thu, 07 Oct 2021 02:28:26 +0000
SELECT * FROM `ibf_core_members` AS `core_members` WHERE `member_id`=11723
IPS\Db\Exception: Lost connection to MySQL server during query (2013)
#0 /home/mysite/public_html/board/system/Db/Select.php(378): IPS\_Db->preparedQuery('SELECT * FROM `...', Array, true)
#1 /home/mysite/public_html/board/system/Db/Select.php(440): IPS\Db\_Select->runQuery()
#2 /home/mysite/public_html/board/system/Db/Select.php(361): IPS\Db\_Select->rewind()
#3 /home/mysite/public_html/board/system/Patterns/ActiveRecord.php(110): IPS\Db\_Select->first()
#4 /home/mysite/public_html/board/system/Member/Member.php(190): IPS\Patterns\_ActiveRecord::load(11723, NULL, NULL)
#5 /home/mysite/public_html/board/system/Content/Search/Results.php(530): IPS\_Member::load(11723)
#6 /home/mysite/public_html/board/applications/core/modules/front/members/profile.php(237): IPS\Content\Search\_Results->addExtraItems(Array, Object(IPS\Member))
#7 /home/mysite/public_html/board/system/Dispatcher/Controller.php(96): IPS\core\modules\front\members\_profile->manage()
#8 /home/mysite/public_html/board/applications/core/modules/front/members/profile.php(65): IPS\Dispatcher\_Controller->execute()
#9 /home/mysite/public_html/board/system/Dispatcher/Dispatcher.php(146): IPS\core\modules\front\members\_profile->execute()
#10 /home/mysite/public_html/board/index.php(13): IPS\_Dispatcher->run()
#11 {main}
#0 /home/mysite/public_html/board/init.php(533): IPS\_Log::log('SELECT * FROM `...', 'uncaught_except...')
#1 [internal function]: IPS\IPS::exceptionHandler(Object(IPS\Db\Exception))
#2 {main}

-------------

Thu, 07 Oct 2021 02:28:26 +0000
SELECT * FROM `ibf_core_members` AS `core_members` WHERE `member_id`=19278
IPS\Db\Exception: Lost connection to MySQL server during query (2013)
#0 /home/mysite/public_html/board/system/Db/Select.php(378): IPS\_Db->preparedQuery('SELECT * FROM `...', Array, true)
#1 /home/mysite/public_html/board/system/Db/Select.php(440): IPS\Db\_Select->runQuery()
#2 /home/mysite/public_html/board/system/Db/Select.php(361): IPS\Db\_Select->rewind()
#3 /home/mysite/public_html/board/system/Patterns/ActiveRecord.php(110): IPS\Db\_Select->first()
#4 /home/mysite/public_html/board/system/Member/Member.php(190): IPS\Patterns\_ActiveRecord::load(19278, NULL, NULL)
#5 /home/mysite/public_html/board/system/Content/Search/Results.php(530): IPS\_Member::load(19278)
#6 /home/mysite/public_html/board/applications/core/modules/front/members/profile.php(237): IPS\Content\Search\_Results->addExtraItems(Array, Object(IPS\Member))
#7 /home/mysite/public_html/board/system/Dispatcher/Controller.php(96): IPS\core\modules\front\members\_profile->manage()
#8 /home/mysite/public_html/board/applications/core/modules/front/members/profile.php(65): IPS\Dispatcher\_Controller->execute()
#9 /home/mysite/public_html/board/system/Dispatcher/Dispatcher.php(146): IPS\core\modules\front\members\_profile->execute()
#10 /home/mysite/public_html/board/index.php(13): IPS\_Dispatcher->run()
#11 {main}
#0 /home/mysite/public_html/board/init.php(533): IPS\_Log::log('SELECT * FROM `...', 'uncaught_except...')
#1 [internal function]: IPS\IPS::exceptionHandler(Object(IPS\Db\Exception))
#2 {main}

-------------

Thu, 07 Oct 2021 02:28:26 +0000
REPLACE INTO `ibf_core_cache` ( `cache_key`, `cache_value`, `cache_expire` ) VALUES
and then very very big query

-------------

Thu, 07 Oct 2021 02:28:26 +0000
REPLACE INTO `ibf_core_cache` ( `cache_key`, `cache_value`, `cache_expire` ) VALUES
and another one

---------------

Thu, 07 Oct 2021 02:28:44 +0000
SELECT word_key, word_default, word_custom FROM `ibf_core_sys_lang_words` AS `core_sys_lang_words` WHERE lang_id=2 AND word_key='404_error_title'
IPS\Db\Exception: MySQL server has gone away (2006)
#0 /home/mysite/public_html/board/system/Db/Select.php(378): IPS\_Db->preparedQuery('SELECT word_key...', Array, true)
#1 /home/mysite/public_html/board/system/Db/Select.php(440): IPS\Db\_Select->runQuery()
#2 /home/mysite/public_html/board/system/Db/Select.php(361): IPS\Db\_Select->rewind()
#3 /home/mysite/public_html/board/system/Lang/Lang.php(605): IPS\Db\_Select->first()
#4 /home/mysite/public_html/board/system/Output/Output.php(560): IPS\_Lang->checkKeyExists('404_error_title')
#5 /home/mysite/public_html/board/init.php(458) : eval()'d code(26): IPS\_Output->error('node_error', '2F173/I', 404, '', Array, NULL, NULL)
#6 /home/mysite/public_html/board/applications/forums/modules/front/forums/topic.php(1024): IPS\cms_hook_Output->error('node_error', '2F173/I', 404, '')
#7 /home/mysite/public_html/board/system/Dispatcher/Controller.php(85): IPS\forums\modules\front\forums\_topic->__call('findComment', Array)
#8 /home/mysite/public_html/board/system/Dispatcher/Controller.php(85): IPS\forums\modules\front\forums\topic->findComment()
#9 /home/mysite/public_html/board/system/Content/Controller.php(50): IPS\Dispatcher\_Controller->execute()
#10 /home/mysite/public_html/board/applications/forums/modules/front/forums/topic.php(39): IPS\Content\_Controller->execute()
#11 /home/mysite/public_html/board/system/Dispatcher/Dispatcher.php(146): IPS\forums\modules\front\forums\_topic->execute()
#12 /home/mysite/public_html/board/index.php(13): IPS\_Dispatcher->run()
#13 {main}
#0 /home/mysite/public_html/board/init.php(533): IPS\_Log::log('SELECT word_key...', 'uncaught_except...')
#1 [internal function]: IPS\IPS::exceptionHandler(Object(IPS\Db\Exception))
#2 {main}


----------------

Thu, 07 Oct 2021 02:30:25 +0000

IPS\Db\Exception: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (2002)
#0 /home/mysite/public_html/board/system/Db/Db.php(119): IPS\_Db::_establishConnection('IPS\\Db', Array, false)
#1 /home/mysite/public_html/board/system/Data/Cache/None.php(119): IPS\_Db::i()
#2 /home/mysite/public_html/board/system/Dispatcher/Front.php(424): IPS\Data\Cache\_None->getWithExpire('page_5ec345424d...', true)
#3 /home/mysite/public_html/board/system/Dispatcher/Front.php(38): IPS\Dispatcher\_Front->checkCached()
#4 /home/mysite/public_html/board/system/Dispatcher/Dispatcher.php(103): IPS\Dispatcher\_Front->init()
#5 /home/mysite/public_html/board/index.php(13): IPS\_Dispatcher::i()
#6 {main}
#0 /home/mysite/public_html/board/init.php(533): IPS\_Log::log('\nIPS\\Db\\Excepti...', 'uncaught_except...')
#1 [internal function]: IPS\IPS::exceptionHandler(Object(IPS\Db\Exception))
#2 {main}

 

Link to comment
Share on other sites

Well, this is a old Debian 7.11 dedicated server with PHP 5.6 and MySQL 5.6. I plan to move now to a new modern VPS server.

Any recommendations for how to do the move?; Should I upgrade first PHP + MySQL (and if so to which versions?) and upgrade IPS to latest stable version and then move to the VPS?
OR
Move to the VPS first and then upgrade?

Any other recommendations?

Link to comment
Share on other sites

Mark H
This post was recognized by Mark H!

"Thanks for the detailed reply."

Randy Calvert was awarded the badge 'Helpful'

IPS\Db\Exception: Too many connections (1040)

If this is a server you have root level access to and you're server is not maxing CPU/memory usage, you can increase the limit.

https://ubiq.co/database-blog/how-to-increase-max-connections-in-mysql/

The above URL has a mySQL command you can run to temporarily increase the limit, and editing the .my.cnf file will be the permanent fix.  

In terms of your plan to move to a new server...  BEFORE you move, make sure the new server is fully up to date.  Get everything installed/configured correctly.  Make sure the new server has all of the dependancies you need.  You can use the following script to make sure your new server has all of the required components installed.

  Once the new server is ready, copy the entire file structure (typically under /public_html) to the new server.  Export your database from the old host and import it.  Make sure you have a mySQL user created and that it has permission to access the new database.  

Then edit conf_global.php to change any system paths or database username/passwords.  

Once that's done, you might want to test everything before pointing live users to the new server.   The following URL has info on how to edit your OS's host file to manually point YOUR DNS to the new server without effecting anyone else:

https://kb.leaseweb.com/products/hosting/web-hosting/adding-a-website-to-hosts-file-and-testing-it

Finally once tested, remove the host file entry and point live DNS to the new host.  

Good luck!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...