OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Intermittent "ojs2: Database connection failed!"

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Intermittent "ojs2: Database connection failed!"

Postby aef » Thu May 09, 2013 12:45 am

OJS/Apache and MySQL are on on different Linux machines.
Most times they work fine.
Several times a day apache error_log reports "ojs2: Database connection failed!".
So far I found no consistency in those failures.

How can I get php session_id for those failed connections to match with MySQL general_log?
What are other ways to find what is going on with the database server during those connection failures?

Thanks
aef
 
Posts: 2
Joined: Thu May 09, 2013 12:12 am

Re: Intermittent "ojs2: Database connection failed!"

Postby asmecher » Thu May 09, 2013 8:37 am

Hi aef,

You ought to be able to configure MySQL to log connection attempts; the existing MySQL logs may already capture the problem. The most likely cause is MySQL limiting the number of concurrent connections.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7737
Joined: Wed Aug 10, 2005 12:56 pm

Re: Intermittent "ojs2: Database connection failed!"

Postby aef » Thu May 09, 2013 7:45 pm

Thank you Alec,

In MySQL general_log I see OJS connection attempts with session_id.
However not all the records have a time stamp.

Our Apache error_log does not show the session_id. That looks like this
[Fri May 10 13:49:55 2013] [error] [client 192.168.10.50] ojs2: Database connection failed!

Can I get session_id in Apache logs or PHP logs or OJS logs? To match with MySQL log records.

Regards,
Andrey
aef
 
Posts: 2
Joined: Thu May 09, 2013 12:12 am


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 9 guests