Jump to content

How to Delete Error_Logs


lindsay_dobson

Recommended Posts

<p>Hello everyone, I hope somebody can advise me. In the last few weeks I've noticed that my website (which includes a Blog) has suddenly started to take up almost all of my available webspace. On looking at the files using C Panel, the culprit appears to be an 8.2Gig "error_log" in the Blog directory. I have no idea why in the last month this has accumulated such a huge number of errors (however my website has been extremely busy in the last few weeks, in terms of visitor numbers). My priority right now is to clear out the error-log to free up some much-needed web space, but I'm not sure how to do it. <br>

<br>

In my C Panel this error_log file is here: public.html>blog>error_log<br>

<br /><br />My first instinct was just to highlight it and then hit the red X (delete) key on the top menu bar in CPanel, however I don't think I should be deleting the log file itself, just the contents (ie thousands of error entries)? But I have no idea of how to access the contents of the error_log in order to clean it out. I am feeling a bit desperate, so any help will be appreciated. <br /><br /><br /></p>

Link to comment
Share on other sites

<p>first off, you should find out what 'changed' to start causing the webserver to start logging that many errors (or what it thinks are errors) or what it's complaining about. There are endless stories of small configuration or even page content flaws that make the webserver (Apache and PHP I'm presuming) spit out zillions of lines of errors.</p>

<p>The error_log will be recreated as needed but your best bet would be to halt the webserver, remove or rename the error_log and then restart the webserver. A new (empty) error_log will be cretaed and then start filling w/ the error messages.</p>

<p>If you know your way around Unix, you could use various commands such as 'truncate' and 'split'</p>

Link to comment
Share on other sites

<p>Hi Howard, thank you very much indeed for the quick response. For some reason I can't view the contents of the error_log file (presumably because it is now so large, at over 8 Gigs) so I'm not sure what is causing the problem. What I want to do is clear it out, and then it will be much easier for me to see where the errors are, since they will presumably keep occurring until I resolve it.</p>

<p>I'm afraid I don't know how to halt the webserver - I'm a novice when it comes to managing website files unfortunately. But the fact that the error_log will be recreated is extremely helpful information - thank you. It seems I can simply delete it and start viewing a fresh log as the errors continue to accumulate, then hopefully identify the core problem.</p>

Link to comment
Share on other sites

<p>Hi Howard, this is the reply I received from my web host:</p>

<p><br /><br /><strong>Thank you for contacting us today. The error log is filled with the following error:</strong><br /><br /><strong>===================================================</strong><br /><strong>[29-Nov-2013 09:19:26] WordPress database error Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' for query SELECT comment_ID FROM wp_comments WHERE comment_post_ID = 6934 AND comment_parent = '0' AND comment_approved != 'trash' AND ( comment_author = 'ガがミラノ時計' OR comment_author_email = 'tarvsnmoqxx@gmail.com' ) AND comment_content = '注目度の高いマークジェイコブス 財布 http://www.lyonsfirst.com/' LIMIT 1 made by wp_new_comment, wp_allow_comment</strong><br /><strong>[29-Nov-2013 10:47:01] PHP Fatal error: Call to a member function tags() on a non-object in /home/linds/public_html/blog/wp-content/themes/prophoto4/classes/seo.php on line 143</strong><br /><strong>===================================================</strong><br /><br /><strong>While the domain names in the errors may be different, these are the two errors that keep repeating. The first error has to do with the structure of your wp_comments table for your WordPress site. The collations need to be corrected. To answer your question about the error log, you can remove it without causing an issue, however as these errors continue, that file will continue to be written to. If you have any further questions, please contact us.</strong><br /><br /><strong><br /></strong></p>

<p>I have deleted the enormous error log file and I will scrutinise new entries when it regenerates itself. But I'm baffled as to why I'm apparently getting thousands of WordPress (with Prophoto template) errors which relate to a very short period of time. About a month ago I decided to restrict comments on my Blog, due to receiving a lot of abuse and trolling. All I did was uncheck the "allow comments" box when I constructed subsequent blog posts (of which there have only been about half a dozen). I can't see how this would cause the problems my host is describing, but I have no idea what to do about it.</p>

<p> </p>

Link to comment
Share on other sites

<p>You should contact the people who makes the Prophoto template. It's their problem.</p>

<p>The problem is that the template they made doesn't take into account that you can write comments in other languages using different character sets (for instance kanjii). So each time a page is viewed the template code (seo.php) looks through the database and it fails. All errors are logged on the webserver that serves your domain, so they end up on your server and grow into a huge file.</p>

<p>As a stop gap measure you should disable all comments. If it is possible you should try to completely erase all comments in Wordpress that use "strange" characters. Make sure you remove them from the "trash can" as well. As long as you have any comments using strange characters still in your system you will get errors every time someone views a page. It's also possible to remove them directly from the mysql database that wordpress uses but that requires database administration knowledge.</p>

<p>PS. To get rid of spam comments on your blog you could look into having the Akismet wordpress plug in installed. Perhaps there are other plug ins as well that does the same thing.</p>

Link to comment
Share on other sites

<p>Thank you Pete, yes I think I will need to have a word with Pro photo. I've had this same template for many years and I have never run into a problem until now. It's very strange. I shall try disabling all comments as you suggest, and I'll have a look back over the last month for any which have any strange characters (it will be difficult to go beyond that as I have thousands of comments throughout the blog). I do use the spam filter which is very effective, although I've noticed in the last couple of weeks a few spam comments got through the net.</p>
Link to comment
Share on other sites

  • 2 weeks later...
<p>Pete, I took your advice and I did contact Prophoto and they were very helpful. With respect to the "line 143" error they took a look at the code and something looked a bit fishy, so they patched it, and that has got rid of that particular error. They also reinstalled some other code for me and recommended that I disable plug-ins and then reintroduce the plug-ins one by one. So it's a question of keeping an eye on things, although I am none the wiser as to why the problem started happening in the first place, it's very odd.</p>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...