Re: MySQL server has gone away

2017-04-03 Thread Mahmood N
>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 Harald <h.rei...@thelounge.net> 
wrote:
 

 

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 <nt_mahm...@yahoo.com> 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

2017-04-03 Thread 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. Regards,
Mahmood 

On Monday, April 3, 2017 10:32 PM, Mahmood N <nt_mahm...@yahoo.com> wrote:
 

 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

2017-04-03 Thread Mahmood N
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

2017-04-03 Thread Mahmood N
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

2017-04-03 Thread Mahmood N
>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

2017-04-03 Thread 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. 

>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

2017-04-03 Thread 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


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

2017-04-03 Thread 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
 Regards,
Mahmood 
  Show original message 

   

Re: MySQL server has gone away

2017-04-03 Thread Mahmood N
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

2017-04-03 Thread Mahmood N
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'Ambrosio <k...@jots.org> wrote:
 

 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 <nt_mahm...@yahoo.com> 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.

   

MySQL server has gone away

2017-04-03 Thread Mahmood N
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