For my purposes I'm perfectly happy to use pymysql instead of mysqldb, but
I'll gladly help with further debugging if you wish to chase this down.
Here's the output for the python session:
Python 3.9.7 (default, Sep 16 2021, 13:09:58)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help",
okey doke let's see what mysql client library you are running, here's a Python
session that locates the .so file in use and then runs the ldd command, which
can give us a clue what you are running, if pymysql has no issue then we need
to suspect client library as a possible factor.
$ python
It does happen on every run. I'm not entirely sure how to run it on a
different server, I'm fairly new to databases. I'm running "mysql Ver
8.0.30 for Linux on x86_64 (MySQL Community Server - GPL)".
The issue does not occur when using pymysql.
On Tuesday, 23 August 2022 at 12:05:24 UTC-4
also try the pymysql DBAPI if that changes things, if this is mariadb try
mariadb-connector also.
On Tue, Aug 23, 2022, at 12:04 PM, Mike Bayer wrote:
> it happens every time the program is run? there's nothing really going on
> in the program here, if I take out the initializer, then the
it happens every time the program is run? there's nothing really going on
in the program here, if I take out the initializer, then the program produces
lots of stack traces as expected, but even then not the "server has gone away"
error.
can you try running on a different MySQL /MariaDB
Hello Mike,
Thank you for your reply. The traceback of the issue is below. I'm using
sqlalchemy 1.4.40 and MySQLdb 2.1.1, the problem does not occur when using
sqlite for the database instead.
Regards,
Geert Jan
Traceback (most recent call last):
File
your program runs completely (thanks), and I can't reproduce any problem.
changed line 1 as written to:
# Line 1.
# If nothing happens on line 1, line 3 fails.
insert_integer(0) # If I do this (insert-only) line 3 fails.
#database_action(0) # If I do this (query, insert) line
Hi,
I am trying to perform some database actions after multiprocessing some
database manipulations but in most cases I get:
sqlalchemy.exc.OperationalError: (MySQLdb._exceptions.OperationalError)
(2006, 'MySQL server has gone away')
The code below is a working example of the problem I'm