Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
SPF filling the error_log
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 9, 2011 - 8:59 pm

the size of the query wont grow... the query is fixed... if there was some sort of loop, it would be the query, then the query, then the query, etc... so the query X times in a row... but the query itself would be small and simple...

yes, the stats run via cron job every hour and update... but the level of activity wouldn't affect the stats... and cron jobs on wp cant run with no activity... so the stats cron, for example would not run every hour if someone didnt visit the site... but if an hour (or 20 with no visits), wp would fire the crons on the next visit...

Andy should be back tomorrow (while I step away for a couple days) and may shed more light.

Avatar
Bill Murray
Member
Free Members
sp_UserOfflineSmall Offline
Oct 9, 2011 - 9:19 pm

Ok. 

The query as reported in the error_log is growing.

If the cron is running on a visit, then maybe someone is visiting the forum page, and the error takes place when generating stats.

If the stats code was updated, maybe I can try updating my SVN.  I am at least 1 week and maybe 2 weeks old.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Oct 14, 2011 - 4:09 am

Not sure I can be much help on the cron job issues as I have about zero expertise in that area but I can discuss the sql error entry.

However I am not sure at all what you mean by the 'query is growing'? It's the same query being run every time that is failing.

You clearly have a single sql error (to be determined) which will then attempt to put an entry in the Sp error log. Because the server has gone away this too generates an error and a further attempt to write to the SP error log.

The questions here are

  1. What was the original sql error that prompted an error log entry? The log is on the previous page but I will go back to see if I can find it.
  2. Why does the sql engine 'go away'? All it is doing at that point is asking the mysql server if it actually has the error log table....!

It would clearly be useful for us to clean the code so that if the error entry fails to write we don't spin intio a loop and I will open a ticket for that. But knowing the answers to the above questions would be a great help.

[UPDATE] There you go. Looks like the first error that then caused the looping error log attempt was this:

[04-Oct-2011 05:13:08] WordPress database error MySQL server has gone away for query SELECT  * FROM wp_sfforums ORDER BY group_id

So it started off with a loss of the mysql server engine - something which perhaps is berst asked of your host.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Bill Murray
Member
Free Members
sp_UserOfflineSmall Offline
Oct 14, 2011 - 10:58 pm

Thanks for the update.

I can only add this info:

1) Without SPF activated, I don't really see errors of mySQL going away.  Prior to a recent update, I didn't see them even with SPF; it was just something that happened recently.

2) Perhaps you have landed on what I meant by the query growing by your discussion of the looping error log.  In a normal setting, if mySQL had gone away, it would trigger an error, and that would be that.  But here, that wasn't the case.

3) There were no entries in the SPF error log, whereas before SPF was writing successfully to the log.  Maybe something broke that?

4) I'll update my SVN now and reload SPF.  Hopefully, it will work smoothly.  I'll report back.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Oct 15, 2011 - 2:49 am

Well 3 was the error you were seeing... trying to create an error log entry.
There is some good info on this out there if you google 'server gone away'. Might just be the wait_timeout setting or just a simple tcp/ip glitch of some sort.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Bill Murray
Member
Free Members
sp_UserOfflineSmall Offline
Oct 21, 2011 - 7:30 pm

I updated to build 7191 and the problem hasn't happened again. 

To clarify, I understand the server gone away issue.  I haven't seen this in my logs in a while, but I have seen them in the past.  It happens and it has nothing to do with SPF.  I get that.  However, in every other instance that I have ever seen, there is 1 or maybe 2 entries in the error log, because it was a problem that, no pun intended, went away.  In other words, the mySQL server had a glitch, but it came back, and the site continued to operate normally.

In the error I was reporting, SPF was filling the log, something that I have never, ever observed before.  I suspect that the cause of filling the error log was the ticket that Andy mentioned above when discussing "clean up the code".

If Andy's fix wasn't in build 7191, maybe there was something else going on.  Maybe I had a bad download.  But to have SPF generating a 100 Mb error log on 1 instance of "server gone away" isn't the way things should be, so I'm glad it's not doing that anymore 🙂

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 22, 2011 - 12:23 am

we have also committed in the last couple days some changes to not generate errors when trying to write to the error log...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 649
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 618
Members: 17348
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10120
Posts: 79607