Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.6k views
in Q2A Core by

When I click "Ask the Question" button and the categories become loading to apper,

 it displays the page at site.com says "A database error occurred" WHY ? How I can resolve this issue But it do not appears when I block the JavaScript from the browser options

by
Can you check in your PHP or MySQL logs for what the error is?
by
Please, Ù‹Where I can find logs in the PHP or MySQL
by
there is no error log in PHPMyAdmin section I see the following tabs

Databases
 SQL
Status
Export
Import
Settings
Variables
Charsets
Engines
by
Please check your web server log . If it is not available check with your hosting provider .
by
these are the errors in the error log
[10-Jul-2015 07:42:02 America/Denver] PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/isalna/public_html/qa-include/ajax/asktitle.php:76) in /home/isalna/public_html/qa-include/app/users.php on line 146
[10-Jul-2015 07:42:51 America/Denver] PHP Warning:  Invalid argument supplied for foreach() in /home/isalna/public_html/qa-include/qa-base.php(572) : eval()'d code on line 77
[10-Jul-2015 00:28:23 America/Denver] PHP Fatal error:  Cannot redeclare get_base_url() (previously declared in /home/isalna/public_html/qa-plugin/qawork/functions.php:7) in /home/isalna/public_html/qa-plugin/ra-option-panel/qa-plugin.php on line 69
[10-Jul-2015 00:28:23 America/Denver] PHP Fatal error:  Cannot redeclare get_base_url() (previously declared in /home/isalna/public_html/qa-plugin/qawork/functions.php:7) in /home/isalna/public_html/qa-plugin/ra-option-panel/qa-plugin.php on line 69
[10-Jul-2015 00:18:43 America/Denver] PHP Notice:  Trying to get property of non-object in /home/isalna/public_html/qa-theme/SnowFlat/qa-theme.php on line 309
[10-Jul-2015 00:18:43 America/Denver] PHP Notice:  Trying to get property of non-object in /home/isalna/public_html/qa-theme/SnowFlat/qa-theme.php on line 309
[06-Jul-2015 09:19:45 America/Denver] PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/isalna/public_html/qa-include/ajax/asktitle.php:76) in /home/isalna/public_html/qa-include/app/users.php on line 146
[07-Jul-2015 07:12:17 America/Denver] PHP Warning:  Invalid argument supplied for foreach() in /home/isalna/public_html/qa-include/qa-base.php(572) : eval()'d code on line 77
[08-Jul-2015 16:23:43 America/Denver] PHP Warning:  mysqli::mysqli() [<a href='mysqli.mysqli'>mysqli.mysqli</a>]: (HY000/1040): Too many connections in /home/isalna/public_html/qa-include/qa-db.php on line 66

1 Answer

0 votes
by

Root cause of your issue is mysql connection limit:

[<a href='mysqli.mysqli'>mysqli.mysqli</a>]: (HY000/1040): Too many connections in /home/isalna/public_html/qa-include/qa-db.php on line 66

If you have root access of your server, you can increase the mysql connection limit by editing mysql configuration file. If you are on shared hosting, you will have to contact your hosting provider.

- Kailash

 

by
I have root access of my server , How I can increase the mysql connection limit ? where I can find the mysql configuration file ? and how to edit it?
by
Login to your server via SSH and edit following file:

/etc/my.cnf

You will need t increase the value for max_connections variable.

You will have to restart MySQL service after making this change.
...