Hi,
My team picked up sanic for a new project.
We are really keen to utilise the performance boost that async can provide.
One of this concerns we have is the use of “mysql.connector.threadsafety = 1” with multiple workers.
Could someone share more context on how workers are created ?
If all workers are real processes, then using “mysql.connector.threadsafety = 1” should be safe.
However, if the workers are actually threads, the use of “mysql.connector.threadsafety = 1” will be a major concern, because there’s no locking to ensure thread safety.
More on mysql python connector thread safety:
Has anyone done any test / experiement on this?
Using mysql/mariadb with python is popular. I bet I’m not the first one.
Thanks ahead.