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

S3Boto3Storage still showing multithreading issues in 1.5.2 #268

Closed
tobiasmcnulty opened this issue Feb 19, 2017 · 0 comments
Closed

S3Boto3Storage still showing multithreading issues in 1.5.2 #268

tobiasmcnulty opened this issue Feb 19, 2017 · 0 comments
Labels

Comments

@tobiasmcnulty
Copy link
Contributor

tobiasmcnulty commented Feb 19, 2017

I'm using S3Boto3Storage in 1.5.2 with uWSGI & 8 threads, and my workers are exiting like so:

app_1    | DAMN ! worker 2 (pid: 15) died, killed by signal 11 :( trying respawn ... 
app_1    | Respawned uWSGI worker 2 (new pid: 20)

Unfortunately I'm not getting a stacktrace. I saw the bug fix that went into 1.5.2 in the release notes (#238) and, on a whim, switched to 1 thread per worker, and the segfaults went away. I also tried S3BotoStorage with multiple threads, and it works fine.

Happy to help debug this if I can, but I'm not entirely sure where to start.

tomkins added a commit to tomkins/django-storages that referenced this issue Jul 7, 2017
Documentation for boto3 recommends a session per thread - https://boto3.readthedocs.io/en/latest/guide/resources.html#multithreading-multiprocessing

As the storage class is (usually) only instantiated once per process, we need to set a thread local for each thread/connection used.

Fixes jschneier#268
jschneier pushed a commit that referenced this issue Jul 27, 2017
Documentation for boto3 recommends a session per thread - https://boto3.readthedocs.io/en/latest/guide/resources.html#multithreading-multiprocessing

As the storage class is (usually) only instantiated once per process, we need to set a thread local for each thread/connection used.

Fixes #268
jschneier added a commit that referenced this issue Jul 27, 2017
nitely pushed a commit to satellogic/django-storages that referenced this issue Jul 30, 2018
Documentation for boto3 recommends a session per thread - https://boto3.readthedocs.io/en/latest/guide/resources.html#multithreading-multiprocessing

As the storage class is (usually) only instantiated once per process, we need to set a thread local for each thread/connection used.

Fixes jschneier#268
nitely pushed a commit to satellogic/django-storages that referenced this issue Jul 30, 2018
nitely pushed a commit to satellogic/django-storages that referenced this issue Jul 30, 2018
Documentation for boto3 recommends a session per thread - https://boto3.readthedocs.io/en/latest/guide/resources.html#multithreading-multiprocessing

As the storage class is (usually) only instantiated once per process, we need to set a thread local for each thread/connection used.

Fixes jschneier#268
nitely pushed a commit to satellogic/django-storages that referenced this issue Jul 30, 2018
nitely pushed a commit to satellogic/django-storages that referenced this issue Jul 30, 2018
Documentation for boto3 recommends a session per thread - https://boto3.readthedocs.io/en/latest/guide/resources.html#multithreading-multiprocessing

As the storage class is (usually) only instantiated once per process, we need to set a thread local for each thread/connection used.

Fixes jschneier#268
nitely pushed a commit to satellogic/django-storages that referenced this issue Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants