forked from jhpyle/docassemble
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As mentioned in the [pikepdf documentation](https://pikepdf.readthedocs.io/en/latest/topics/pages.html#pdf-split-merge-and-document-assembly), we should close the PDF files after using them. Letting them hang around can cause issues with python and C++ references. One issue that this patch seems to fix is a potential issue with calling `pdf_concatenate` under load. Before this patch, with 6 individual sessions of the [Assembly Line Weaver](https://github.com/SuffolkLITLab/docassemble-ALWeaver) open in different browsers, I can consistently get the following error to appear in the `uwsgi.log`: ``` terminate called after throwing an instance of 'std::runtime_error' what(): pybind11_object_dealloc(): Tried to deallocate unregistered instance! DAMN ! worker 1 (pid: 666329) died, killed by signal 6 :( trying respawn ... Respawned uWSGI worker 1 (new pid: 683455) ``` This unexpected closing of the uWSGI worker causes other issues with sqlalchemy, and can cause the server to return 502s for 5-10 seconds after the worker crashes. After the patch, I can't reproduce the issue anymore. Can't say it's completely gone, but it's definitely less prelevant.
- Loading branch information
1 parent
36991c4
commit 4a5abab
Showing
5 changed files
with
26 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters