Re: MySQL server has gone away
>well, who did set it that low? ِDon't know. Maybe the previous admin hadn't used mysql for sending emails!! Anyway, thanks. Regards, Mahmood On Monday, April 3, 2017 11:37 PM, Reindl Haraldwrote: Am 03.04.2017 um 20:41 schrieb Mahmood N: > Good news! > > I changed wait_timeout=30 to wait_timeout=600 and now the error > disappears... I don't know if long_query_time=1 has effect. well, who did set it that low? https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout http://orbisius.com/howto/web-development/change-mysqls-wait_timeout-interactive_timeout-variables/ > On Monday, April 3, 2017 10:32 PM, Mahmood N wrote: > I tested with both 5 and 1 and see the log files are empty. > > I am really confused about that error and it is taking more than 2 weeks > about that! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql
Re: MySQL server has gone away
Am 03.04.2017 um 20:41 schrieb Mahmood N: Good news! I changed wait_timeout=30 to wait_timeout=600 and now the error disappears... I don't know if long_query_time=1 has effect. well, who did set it that low? https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout http://orbisius.com/howto/web-development/change-mysqls-wait_timeout-interactive_timeout-variables/ On Monday, April 3, 2017 10:32 PM, Mahmood Nwrote: I tested with both 5 and 1 and see the log files are empty. I am really confused about that error and it is taking more than 2 weeks about that! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: MySQL server has gone away
Good news! I changed wait_timeout=30 to wait_timeout=600 and now the error disappears... I don't know if long_query_time=1 has effect. Regards, Mahmood On Monday, April 3, 2017 10:32 PM, Mahmood Nwrote: Dear reindl, I tested with both 5 and 1 and see the log files are empty. I am really confused about that error and it is taking more than 2 weeks about that! Regards, Mahmood
Re: MySQL server has gone away
Dear reindl, I tested with both 5 and 1 and see the log files are empty. I am really confused about that error and it is taking more than 2 weeks about that! Regards, Mahmood
Re: MySQL server has gone away
Am 03.04.2017 um 19:45 schrieb Mahmood N: So I set long_query_time=5 and restarted the service. Test the email page again. Still the logs are empty WTF - you had it set to 5 seconds 2 hours ago i am out here... Am 03.04.2017 um 18:11 schrieb Mahmood N: > The my.conf file contains > > log_error=/var/log/mysql/error.log > slow_query_log=1 > slow_query_log_file=/var/log/mysql/error_slow.log > max_connections=200 > max_user_connections=30 > wait_timeout=30 > interactive_timeout=50 > long_query_time=5 > character-set-client-handshake = FALSE > thread_concurrency = 8 > query_cache_size = 16M > thread_cache_size = 8 > max_allowed_packet = 8M "long_query_time=5" is low when you talk about 5 seconds as i remember in previuos posts - given that a reasonable server should be able to handle hunredts to thousands of requests per second anything above 1 second is a alert sign -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: MySQL server has gone away
So I set long_query_time=5 and restarted the service. Test the email page again. Still the logs are empty. Regards, Mahmood
Re: MySQL server has gone away
>since when is phpinfo() - the *real* active configuration be it changed >by some config snippet, vhost-configuration or even ini_set() - the same >than a random file in /etc? Sorry I totally didn't understand that sentence... Regards, Mahmood
Re: MySQL server has gone away
Am 03.04.2017 um 19:26 schrieb Mahmood N: given that a reasonable server should be able to handle hunredts to thousands of requests per second anything above 1 second is a alert sign Excuse me, do you mean higher values are better? I didn't understand. I said in my posts that when I submit the email test, the refresh time for that page is about 5 minutes. if you think a moment you realize that lower values are better when 5 seconds don't log any query and you have obvious slow queries look also in phpinfo() for mysqlnd and mysql params containing "timeout" and/or "max" in /etc/php/7.0/apache2/php.ini I see ;mysqlnd.net_read_timeout = 31536000 Note that is comment since when is phpinfo() - the *real* active configuration be it changed by some config snippet, vhost-configuration or even ini_set() - the same than a random file in /etc? http://php.net/manual/en/function.phpinfo.php -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: MySQL server has gone away
>given that a reasonable server should be able to >handle hunredts to thousands of requests per second anything above 1 >second is a alert sign Excuse me, do you mean higher values are better? I didn't understand. I said in my posts that when I submit the email test, the refresh time for that page is about 5 minutes. >look also in phpinfo() for mysqlnd and mysql params containing "timeout" >and/or "max" in /etc/php/7.0/apache2/php.ini I see ;mysqlnd.net_read_timeout = 31536000 Note that is comment. Regards, Mahmood
Re: MySQL server has gone away
Am 03.04.2017 um 18:11 schrieb Mahmood N: The my.conf file contains log_error=/var/log/mysql/error.log slow_query_log=1 slow_query_log_file=/var/log/mysql/error_slow.log max_connections=200 max_user_connections=30 wait_timeout=30 interactive_timeout=50 long_query_time=5 character-set-client-handshake = FALSE thread_concurrency = 8 query_cache_size = 16M thread_cache_size = 8 max_allowed_packet = 8M "long_query_time=5" is low when you talk about 5 seconds as i remember in previuos posts - given that a reasonable server should be able to handle hunredts to thousands of requests per second anything above 1 second is a alert sign I restarted the mysql server (/etc/init.d/mysql restart on ubuntu) and tested the email page one again. I again see that error message on the browser, however, the log files are empty. look also in phpinfo() for mysqlnd and mysql params containing "timeout" and/or "max" -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: MySQL server has gone away
The my.conf file contains log_error=/var/log/mysql/error.log slow_query_log=1 slow_query_log_file=/var/log/mysql/error_slow.log max_connections=200 max_user_connections=30 wait_timeout=30 interactive_timeout=50 long_query_time=5 character-set-client-handshake = FALSE thread_concurrency = 8 query_cache_size = 16M thread_cache_size = 8 max_allowed_packet = 8M I restarted the mysql server (/etc/init.d/mysql restart on ubuntu) and tested the email page one again. I again see that error message on the browser, however, the log files are empty. Regards, Mahmood
Re: MySQL server has gone away
Am 03.04.2017 um 17:52 schrieb Mahmood N: Dear all, Currently max_allowed_packet is set to 8M. That test email is simply a test email containing some basic information in the message body to assure that the email system works. Thing that can help me is to put mysql in the debug mode in one terminal and at the same time, submit a test email from the browser. Then I can see what is going there in sql. This process is similar to sshd debug mode where I can turn on the ssh service in the debug mode and see what is what. Is there is any other option for debugging, please let me know. The MySQL Error Log may contain details explaining why mysqld was unable to stay running If you are referring to /var/log/musql/error.log then I have to say it is empty! Perhaps you could connect your mysql client, load the screen, then run show full processlist every second or so to see what queries are going on. As I said, I know few things about mysql. Please let me know the steps to do that https://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: MySQL server has gone away
Dear all, Currently max_allowed_packet is set to 8M. That test email is simply a test email containing some basic information in the message body to assure that the email system works. Thing that can help me is to put mysql in the debug mode in one terminal and at the same time, submit a test email from the browser. Then I can see what is going there in sql. This process is similar to sshd debug mode where I can turn on the ssh service in the debug mode and see what is what. Is there is any other option for debugging, please let me know. >The MySQL Error Log may contain details explaining why mysqld was unable to >stay running If you are referring to /var/log/musql/error.log then I have to say it is empty! >Perhaps you could connect your mysql client, load the screen, then run show >full processlist every second or so to see what queries are going on. As I said, I know few things about mysql. Please let me know the steps to do that Regards, Mahmood Show original message
Re: MySQL server has gone away
On 4/3/2017 8:15 AM, Mahmood N wrote: When I click on the submit button in Moodle and it is waiting for refresh, I execute the mysql command but the output is not meaningful mahmood@ce:/var/www/html/courses$ mysql -u moodle -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 30912 Server version: 5.5.54-0ubuntu0.14.04.1 (Ubuntu) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show full processlist -> -> Meanwhile using Webmin, I execute the same command for that user and see Output from SQL command show full processlist .. | Id | User | Host | db | Command | Time | State | Info | | 30912 | moodle | localhost | | Sleep | 42 | I am not expert with MySQL, however as the Moodle admin I am trying to fix the problems. Regards, Mahmood You need to consider a few possibilities, a) Moodle didn't want to wait long enough for the query to complete (a Moodle Timeout) so it said "the server is not responding..." b) Moodle sent MySQL a command that was "too large". To protect itself from abuse, all MySQL instances have a configurable limit about how "large" a command can be. If the command is larger than this limit, the server rejects it and closes the connection. (this could explain why the query you just attempted from Moodle is not visible in the list of executing commands) c) Something is unstable in your MySQL instance. The MySQL Error Log may contain details explaining why mysqld was unable to stay running. The angel process mysqld_safe would try to restart the server automatically which could explain why Moodle was only unresponsive for a short while. Additional resources: https://dev.mysql.com/doc/refman/5.6/en/problems.html (in particular, review B.5.2) -- Shawn Green MySQL Senior Principal Technical Support Engineer Oracle USA, Inc. - Integrated Cloud Applications & Platform Services Office: Blountville, TN Become certified in MySQL! Visit https://www.mysql.com/certification/ for details. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: MySQL server has gone away
When I click on the submit button in Moodle and it is waiting for refresh, I execute the mysql command but the output is not meaningful mahmood@ce:/var/www/html/courses$ mysql -u moodle -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 30912 Server version: 5.5.54-0ubuntu0.14.04.1 (Ubuntu) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show full processlist -> -> Meanwhile using Webmin, I execute the same command for that user and see Output from SQL command show full processlist .. | Id | User | Host | db | Command | Time | State | Info | | 30912 | moodle | localhost | | Sleep | 42 | I am not expert with MySQL, however as the Moodle admin I am trying to fix the problems. Regards, Mahmood
Re: MySQL server has gone away
I'd suspect the underlying query is poorly designed for the amount of data you have stored. If you have access to the mysql server you could connect to it using any mysql client and run 'show full processlist' to see the query as that page is trying to load. The query is probably in the 'sending data' state and gets killed at the limit of one of the timeout variables. This causes the application to throw that error you have. Copy that query out, prefix it with explain and see if there are any tables in the query where an index could be added to optimize the database for the query. On Mon, Apr 3, 2017 at 6:09 AM, Ken D'Ambrosiowrote: > Basically, it says that MySQL is not responding to queries. So it likely > has died, or perhaps is mis-configured. > > On April 3, 2017 7:07:25 AM EDT, Mahmood N wrote: > >Hi,I am using Moodle which itself uses SQL for the database. Problem is > >that, when I run the email plugin and execute the command, the refresh > >time of the page becomes high (in the order of 3-5 minutes) and at the > >end, I see this message > >Debug info: MySQL server has gone away > >SELECT id, sid, state, userid, lastip, timecreated, timemodified FROM > >mdl_sessions WHERE sid = ? > >[array ( > > 0 => 'jqfbgd5b0q6e2l81bb5gb87mn3', > >)] > >Error code: dmlreadexceptionStack trace: > > - line 479 of /lib/dml/moodle_database.php: dml_read_exception thrown > >- line 1175 of /lib/dml/mysqli_native_moodle_database.php: call to > >moodle_database->query_end() > >- line 1551 of /lib/dml/moodle_database.php: call to > >mysqli_native_moodle_database->get_records_sql() > >- line 1523 of /lib/dml/moodle_database.php: call to > >moodle_database->get_record_sql() > >- line 1502 of /lib/dml/moodle_database.php: call to > >moodle_database->get_record_select() > >- line 286 of /lib/classes/session/manager.php: call to > >moodle_database->get_record() > >- line 82 of /lib/classes/session/manager.php: call to > >core\session\manager::initialise_user_session() > > - line 785 of /lib/setup.php: call to core\session\manager::start() > > - line 27 of /config.php: call to require_once() > > - line 30 of /index.php: call to require_once() > > > > > >Although it looks like a bug in Moodle, but the guys said it is a MySQL > >issue. I am confused about that. If you have any idea please let me > >know. What does this error say exactly? > > > > Regards, > >Mahmood > > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. -- - Johnny Withers 601.209.4985 joh...@pixelated.net
Re: MySQL server has gone away
Thanks for the quick reply. So, how can I get further information? Thing is that, after 5 minutes, when I refresh the page every thing is normal. Regards, Mahmood On Monday, April 3, 2017 3:39 PM, Ken D'Ambrosiowrote: Basically, it says that MySQL is not responding to queries. So it likely has died, or perhaps is mis-configured. On April 3, 2017 7:07:25 AM EDT, Mahmood N wrote: Hi,I am using Moodle which itself uses SQL for the database. Problem is that, when I run the email plugin and execute the command, the refresh time of the page becomes high (in the order of 3-5 minutes) and at the end, I see this message Debug info: MySQL server has gone away SELECT id, sid, state, userid, lastip, timecreated, timemodified FROM mdl_sessions WHERE sid = ? [array ( 0 => 'jqfbgd5b0q6e2l81bb5gb87mn3', )] Error code: dmlreadexceptionStack trace: - line 479 of /lib/dml/moodle_database.php: dml_read_exception thrown - line 1175 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end() - line 1551 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql() - line 1523 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql() - line 1502 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select() - line 286 of /lib/classes/session/manager.php: call to moodle_database->get_record() - line 82 of /lib/classes/session/manager.php: call to core\session\manager::initialise_user_session() - line 785 of /lib/setup.php: call to core\session\manager::start() - line 27 of /config.php: call to require_once() - line 30 of /index.php: call to require_once() Although it looks like a bug in Moodle, but the guys said it is a MySQL issue. I am confused about that. If you have any idea please let me know. What does this error say exactly? Regards, Mahmood -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Re: MySQL server has gone away
Basically, it says that MySQL is not responding to queries. So it likely has died, or perhaps is mis-configured. On April 3, 2017 7:07:25 AM EDT, Mahmood Nwrote: >Hi,I am using Moodle which itself uses SQL for the database. Problem is >that, when I run the email plugin and execute the command, the refresh >time of the page becomes high (in the order of 3-5 minutes) and at the >end, I see this message >Debug info: MySQL server has gone away >SELECT id, sid, state, userid, lastip, timecreated, timemodified FROM >mdl_sessions WHERE sid = ? >[array ( > 0 => 'jqfbgd5b0q6e2l81bb5gb87mn3', >)] >Error code: dmlreadexceptionStack trace: > - line 479 of /lib/dml/moodle_database.php: dml_read_exception thrown >- line 1175 of /lib/dml/mysqli_native_moodle_database.php: call to >moodle_database->query_end() >- line 1551 of /lib/dml/moodle_database.php: call to >mysqli_native_moodle_database->get_records_sql() >- line 1523 of /lib/dml/moodle_database.php: call to >moodle_database->get_record_sql() >- line 1502 of /lib/dml/moodle_database.php: call to >moodle_database->get_record_select() >- line 286 of /lib/classes/session/manager.php: call to >moodle_database->get_record() >- line 82 of /lib/classes/session/manager.php: call to >core\session\manager::initialise_user_session() > - line 785 of /lib/setup.php: call to core\session\manager::start() > - line 27 of /config.php: call to require_once() > - line 30 of /index.php: call to require_once() > > >Although it looks like a bug in Moodle, but the guys said it is a MySQL >issue. I am confused about that. If you have any idea please let me >know. What does this error say exactly? > > Regards, >Mahmood -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
MySQL server has gone away
Hi,I am using Moodle which itself uses SQL for the database. Problem is that, when I run the email plugin and execute the command, the refresh time of the page becomes high (in the order of 3-5 minutes) and at the end, I see this message Debug info: MySQL server has gone away SELECT id, sid, state, userid, lastip, timecreated, timemodified FROM mdl_sessions WHERE sid = ? [array ( 0 => 'jqfbgd5b0q6e2l81bb5gb87mn3', )] Error code: dmlreadexceptionStack trace: - line 479 of /lib/dml/moodle_database.php: dml_read_exception thrown - line 1175 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end() - line 1551 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql() - line 1523 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql() - line 1502 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select() - line 286 of /lib/classes/session/manager.php: call to moodle_database->get_record() - line 82 of /lib/classes/session/manager.php: call to core\session\manager::initialise_user_session() - line 785 of /lib/setup.php: call to core\session\manager::start() - line 27 of /config.php: call to require_once() - line 30 of /index.php: call to require_once() Although it looks like a bug in Moodle, but the guys said it is a MySQL issue. I am confused about that. If you have any idea please let me know. What does this error say exactly? Regards, Mahmood