Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Internal Server Error - CDbConnection failed to open the DB connection

  • harishpraveen27
  • harishpraveen27's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 7 months ago #139591 by harishpraveen27
Hi,

I am using lime survey for more than a year with 100+ users. I didn't had any problem at all. since last thursday, when i have more than 40 users, i am getting the below error


Internal Server Error
CDbConnection failed to open the DB connection.

An internal error occurred while the Web server was processing your request. Please contact the webmaster to report this problem.

Thank you.
2016-07-25 08:54:14
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 7 months ago #139628 by DenisChenu
Seems there are an issue with the DB or the DB connector.

Check your DB server.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • harishpraveen27
  • harishpraveen27's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 7 months ago #139629 by harishpraveen27
Hi Denis,


thanks for your reply.


Any particular area/file I need to look into?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 7 months ago #139662 by DenisChenu
You DB is configurated in application/config/config.php

BUT : if the DB server is broken : it's not a limesurvey issue ....

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
More
6 years 1 month ago #162877 by frisket
I have exactly the same problem.

Last night we upgraded from PHP 5.3.3 to 5.6, so that's clearly caused the problem, but having stopped and restarted apache and mysql I don't know what component is causing the error.
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 1 month ago #162880 by LouisGac
this error message comes very early in the bootstrapping of the application: when it tries to connect to the DataBase. You should check your credentials.
The topic has been locked.
More
6 years 1 month ago #162883 by jelo

frisket wrote: Last night we upgraded from PHP 5.3.3 to 5.6, so that's clearly caused the problem, but having stopped and restarted apache and mysql

What OS? What version of MySQL is used? What version of Limesurvey is used?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: ls19inalde
The topic has been locked.
More
6 years 1 month ago #162892 by frisket
No, the credentials are fine: they were not changed. IMHE in these cases (server PHP applications) it's usually an error that occurs when the config is static (ie nothing inside the application or its settings has changed).

In this case it turns out that the error affects the credentials, but they themselves are correct: it is more subtle: see www.omniweb.com/wordpress/?p=700

I needed to reset the passwords of all affected applications (this server runs much more than just LimeSurvey), using the long form of the command:

UPDATE user set Password = PASSWORD(‘userpassword’) where User=’username’ ;

and edit /etc/my.cnf to add the line

old_passwords=1

That seems to have fixed it for now.
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 1 month ago #162894 by LouisGac

frisket wrote: No, the credentials are fine: they were not changed.



Is that a logical assumption ("they were not changed, so they still work") or did you actually tested it?
Because sometimes you can save a great amount of time by dumb testing something that should logically work...


github.com/LimeSurvey/LimeSurvey/blob/ma...sample-mysql.php#L29


The host could fail ("localhost" still working after your OS upgrade? May be now you should use 127.0.0.1 or 192.168.0.1), and the port could fail too.

So, a quick test of the credentials via PHP in command line could just eliminate those hypothesis.

Also... Have you tried turning the server off and on again? :P
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 1 month ago #162895 by LouisGac

frisket wrote: That seems to have fixed it for now.


Ok, I just seen that now.

:side:
The topic has been locked.
More
6 years 1 month ago #162903 by jelo

frisket wrote: old_passwords=1

That was implemented when MySql 4 changed the password concept.
So mostly during the transition from MySQL 4.0 to 4.1 that old_passwort support was used.
When you change the MySQL user passwords, you don't need the old_passwords support.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: LouisGac
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose