Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL timeouts sanitising big transfers #3395

Closed
jtweed opened this issue Feb 1, 2019 · 3 comments
Closed

MySQL timeouts sanitising big transfers #3395

jtweed opened this issue Feb 1, 2019 · 3 comments

Comments

@jtweed
Copy link
Contributor

jtweed commented Feb 1, 2019

Looks like Archivematica is holding open database connections whilst it tries to do jobs.

This means when you have a transfer that contains a lot of files, by the time it tries to write the results of the job, the connection has timed out and it fails the job.

Example:

Transfer: EXHIBITION ARCHIVE
Task: 45485279-8855-459c-9df3-02eb22310b94

archivematicaClient.py: ERROR 2019-01-31 19:56:55,721 archivematica.common:retryOnFailure:373: Failed to complete transaction "Write task results" after 10 retries
archivematicaClient.py: ERROR 2019-01-31 19:56:55,721 archivematica.mcp.client:execute_command:231: Exception while processing task sanitizeobjectnames_v0.0: (2006, 'MySQL server has gone away')
@helenst
Copy link

helenst commented Mar 13, 2019

Related: archivematica/Issues#313

@alexwlchan
Copy link
Contributor

I saw a live repro:

archivematicaClient.py: ERROR 2019-03-20 17:05:30,038 archivematica.common:retryOnFailure:316: Failed to complete transaction "Write task results" after 10 retries
archivematicaClient.py: ERROR 2019-03-20 17:05:30,038 archivematica.mcp.client:execute_command:231: Exception while processing task sanitizeobjectnames_v0.0: (2006, 'MySQL server has gone away')
Traceback (most recent call last):
  File "/src/MCPClient/lib/archivematicaClient.py", line 224, in execute_command
    retryOnFailure("Write task results", write_task_results_callback)
  File "/src/archivematicaCommon/lib/databaseFunctions.py", line 317, in retryOnFailure
    raise e
OperationalError: (2006, 'MySQL server has gone away')

Googling suggests this can be caused if you have a timeout or you ask SQL to execute an unusually large query. I’ll drop in some more tracing tomorrow and see what I can find.

@jtweed
Copy link
Contributor Author

jtweed commented Oct 7, 2019

Closing to tidy up the backlog. Will reopen as a new issue if we see it again with our actual workflow.

@jtweed jtweed closed this as completed Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants