GitHub user potiuk added a comment to the discussion: FAB Provider - 'Server 
has gone away'

Also this is what Claude says:

That's a classic MySQL error. It typically means the connection between your 
application and MySQL server was dropped. The most common causes are:
The connection timed out. MySQL has a wait_timeout setting (default 8 hours) 
that closes idle connections. If your app holds a connection longer than that 
without using it, the next query fails with this error.
The query or result was too large. MySQL's max_allowed_packet setting limits 
the size of a single query/response. If you're inserting or retrieving large 
blobs or huge INSERT statements, it'll sever the connection.
The MySQL server restarted or crashed between when the connection was 
established and when the query ran.
Fixes depend on your stack, but the most common ones:
For connection timeout issues — enable connection pooling with recycling. If 
you're using SQLAlchemy, set pool_recycle to something shorter than MySQL's 
wait_timeout:
pythonengine = create_engine("mysql://...", pool_recycle=3600, 
pool_pre_ping=True)
pool_pre_ping=True is especially helpful — it tests each connection before 
using it and transparently replaces dead ones.
For packet size issues — increase max_allowed_packet in your MySQL config:
ini[mysqld]
max_allowed_packet = 64M
Then restart MySQL. You can check the current value with SHOW VARIABLES LIKE 
'max_allowed_packet';.
Are you seeing this intermittently on idle connections, or consistently on 
specific queries? That would help narrow down which cause it is.

GitHub link: 
https://github.com/apache/airflow/discussions/63718#discussioncomment-16157509

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to