Simple Machines Community Forum

SMF Support => Server Performance and Configuration => Topic started by: Bose321 on May 23, 2012, 03:55:07 AM

Title: Database processes
Post by: Bose321 on May 23, 2012, 03:55:07 AM
Not relative anymore.
Title: Re: Database processes
Post by: ScottReddicks on May 24, 2012, 08:38:16 AM
I also face the same problem.If you got some suggestion.Reply me soon.

Title: Re: Database processes
Post by: Bose321 on May 24, 2012, 08:54:15 AM
Do you also have Aeva installed?

The processes I see are all sleep processes and seem to spike. Last night I had to login to the database to stop all of these because they increased litterary with second.
Title: Re: Database processes
Post by: butch2k on May 25, 2012, 03:55:25 AM
Which mods have you installed ?
Title: Re: Database processes
Post by: Bose321 on May 25, 2012, 04:47:04 AM
Title: Re: Database processes
Post by: butch2k on May 25, 2012, 04:52:36 AM
hummm...
Do you know many simultaneous MySQL connections you are authorized to open by your host ?
How many people are connected to your board when this happen ?
Title: Re: Database processes
Post by: Bose321 on May 25, 2012, 05:13:22 AM
I'm not sure, but from what I've seen in the past the website tends to crash when there are 25+.

The number people on the site varies, but usually it's around 15-20 when it happens I believe.
Title: Re: Database processes
Post by: butch2k on May 25, 2012, 09:37:55 AM
Looks like you hit the limit of your package, a single user might requires 20/30 queries just to display a page using SimplePortal, with 20 users online it's highly possible to reach 20+ open DB connections at the same time on a shared hosting and slow package.
Did you activate permanent database connections in SMF admin panel ?
Title: Re: Database processes
Post by: Bose321 on May 25, 2012, 10:04:27 AM
No I have not. I've been running these mods for 4 years now. Last few months this problem has occured. Loads have happened, but I do not what has caused it.
Title: Re: Database processes
Post by: Storman™ on May 25, 2012, 02:52:01 PM
Have you got "Recent Posts/Topics" module active in Simpleportal? That's known to kill it if resources are tight.

Also, are you able to consider optimising MySQL or do you not have access to the server files (such as my.cnf) ?
Title: Re: Database processes
Post by: Bose321 on May 28, 2012, 05:25:48 PM
Quote from: Storman on May 25, 2012, 02:52:01 PM
Have you got "Recent Posts/Topics" module active in Simpleportal? That's known to kill it if resources are tight.

Also, are you able to consider optimising MySQL or do you not have access to the server files (such as my.cnf) ?
I did, turned it off but same problems.

I do not have access to such files.

It's really bad right now, I actually written a script that checks for sleeping processes every hour and kills them. I know it's a bad and dirty 'fix', but else my website simply doesn't stay on...

I am really frustrated and have no clue what's wrong...
Title: Re: Database processes
Post by: Tyrsson on May 29, 2012, 12:04:44 AM
Who is your host?

How many active users would you usually say is online when this occurs?

What type of hosting do you have? Shared, VPS or dedicated?
Title: Re: Database processes
Post by: Bose321 on May 29, 2012, 03:21:32 AM
Quote from: Joey Smith™ on May 29, 2012, 12:04:44 AM
Who is your host?

How many active users would you usually say is online when this occurs?

What type of hosting do you have? Shared, VPS or dedicated?
Not sure about that, I believe a friend of mine who hosts it has a small company. The controlpanel login says Ellmore Consultancy.

The amount of users varies between 15-20 I believe.

I honestly don't know about wether it's shared/dedicated or a VPS.
Title: Re: Database processes
Post by: Bose321 on June 03, 2012, 09:41:11 AM
This error pops up alot on my website:

[Sun Jun 03 14:30:58 2012] [error] [client 78.165.150.209] PHP Warning:  mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/sites/lfsdatabase.eu/public_html/Sources/Subs-Db-mysql.php on line 136, referer: http://lfsdatabase.eu/index.php?action=media;sa=item;in=449

I've just reinstalled Aeva media to see if that would fix it, but it didn't...

Also uninstalled Bot Buster, so that was not it either. I really think something is wrong with (my) Aeva media...
Title: Re: Database processes
Post by: Arantor on June 03, 2012, 10:09:28 AM
That error is unrelated to Aeva Media.

It is also discussed in great length elsewhere on this forum (as a search would quickly confirm, including the real cause of it and a solution)
Title: Re: Database processes
Post by: Bose321 on June 03, 2012, 10:54:28 AM
I think I which thread you're talking about, but that did not solve it for me.
Title: Re: Database processes
Post by: Arantor on June 03, 2012, 11:39:02 AM
Then you didn't read all the thread.
Title: Re: Database processes
Post by: Bose321 on June 03, 2012, 11:40:05 AM
I have went through all pages and tried all code snippets that were posted.
Title: Re: Database processes
Post by: Arantor on June 03, 2012, 12:09:16 PM
The snippets solved the problem related to mysql_real_escape_string, if you still get the same error flooding over and over, something else is wrong. But it's impossible to tell given how little information you're providing.
Title: Re: Database processes
Post by: Bose321 on June 03, 2012, 12:46:32 PM
I applied that fix, and it did solve the errors I got, but it did not solve the actual problem with the amount of sleeping processes.

Could you be kind enough to tell me what I can provide as information so I can be helped better, instead of telling me I provide so little information?
Title: Re: Database processes
Post by: Arantor on June 03, 2012, 01:06:01 PM
What other mods you have installed would be a great place to start.

There are very few DB processes running according to your status.php.
Title: Re: Database processes
Post by: Bose321 on June 03, 2012, 02:48:00 PM
Quote from: Bose321 on May 25, 2012, 04:47:04 AM

  • Aeva media
  • Bakers Dozen Pages
  • SimplePortal
  • Bot Buster
I've said that, and also that I removed Bot buster which didn't help.
Title: Re: Database processes
Post by: Bose321 on June 05, 2012, 05:08:24 PM
Something that also might be interesting is that it only happens on one Aeva media item.

[Tue Jun 05 17:53:58 2012] [error] [client 124.121.51.54] PHP Warning:  mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/sites/lfsdatabase.eu/public_html/Sources/Subs-Db-mysql.php on line 136, referer: http://lfsdatabase.eu/index.php?action=media;sa=item;in=449

Always the 449. This is a very popular file and gets downloaded a lot.
Title: Re: Database processes
Post by: Bose321 on June 07, 2012, 01:59:45 PM
Also seeing a lot of 503 server errors via Google webmasters...