Skip to main content
added 41 characters in body
Source Link
sav1sav
  • 11
  • 1
  • 5

But i'm getting this errors: (This is happening only on a BIGGER BLOB) PHP:

But i'm getting this errors: PHP:

But i'm getting this errors: (This is happening only on a BIGGER BLOB) PHP:

Source Link
sav1sav
  • 11
  • 1
  • 5

General error: 2006 MySQL server has gone away. All settings fine

I have 2 linux servers. 1 is running apache2 with an PHP application and the other one is running mysql 5.7. (so a remote connection to DB)

PHP applications tried to create a BIGBLOB from a file (90MB) and store it into SQL.

But i'm getting this errors: PHP:

[PDOException] SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

MYSQL:

2022-03-24T14:22:41.443626Z 268701 [Note] Aborted connection 268701 to db: 'bug' user: 'user' host: 'subdomain.hostname.com' (Got an error reading communication packets)

I searched the hole internet. I did the following updating: max_allowed_packet to 1GB, i checked: wait_timeout and interactive_timeout they are fine (28880 seconds) I added SWAP memory. Nothing is working. Any ideas?

P.S: Seems connetion is getting cut somewhere after 30 seconds. but i can't tell for sure and why.

This are the MySQL settings:

mysql> show global variables like "%timeout%";
+-----------------------------+----------+
| Variable_name               | Value    |
+-----------------------------+----------+
| connect_timeout             | 10       |
| delayed_insert_timeout      | 300      |
| have_statement_timeout      | YES      |
| innodb_flush_log_at_timeout | 1        |
| innodb_lock_wait_timeout    | 50       |
| innodb_rollback_on_timeout  | OFF      |
| interactive_timeout         | 28800    |
| lock_wait_timeout           | 31536000 |
| net_read_timeout            | 120      |
| net_write_timeout           | 120      |
| rpl_stop_slave_timeout      | 31536000 |
| slave_net_timeout           | 60       |
| wait_timeout                | 28800    |
+-----------------------------+----------+

 max_allowed_packet                                   | 1073741824           |

RAM:

              total        used        free      shared  buff/cache   available
Mem:           7976        1056         256           1        6663        6630
Swap:         10239           8       10231