News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Error log madness

Started by Mollusk, February 14, 2008, 04:30:57 AM

Previous topic - Next topic

Mollusk

Hi !

I got some problems with the default error log system (which is otherwise awesome) and wanted to share... Maybe some minor changes could be made to SMF to prevent stuff like that from happening again (even though it was 100% my fault)

I coded a quick portal for one of my forums, and have a game list on it. So I had a foreach loop to build the game menu, and another loop inside it for something else (can't remember and not important). I made a quick typo (added 1 letter) to the variable name I used for an if in that loop, and basicaly, it ended up with >100 erros/page view... But as by default the php errors were hidden, and because everything displayed perfectly well, I didn't notice the typo :s

I was away for a while, and 3 days later, the database was shut down by 1and1 :/ That's when I noticed that it generated more than 100 SQL queries/page view, and the database had grown by 20MB in just a few days. I never got my database back as 1&1 wanted me to fax my name, address, username, and password, and I don't really feel like writing those down and sending them by fax... I had a database backup from a few days back, moved to a different database and fixed the typo, and everything went fine.

But in the end, shouldn't there be a safe system to prevent this ? Like, send a mail if the number of queries is unusually high, or only log the first 10 errors, or something like that... I haven't found anyone with a similar problem, and I'm perfectly aware it's 100% my fault, but I guess it's a stupid mistake that could happen to anyone who's adding a portal or custom pages to SMF...

That's it for the feedback. Other than that, SMF is great ! :D

Advertisement: