Bug #51881
fichier laissé ouvert après conversion pdf
Début:
10 mars 2021
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
erreur "Too many open files" dans un job asynchrone, après avoir fait beaucoup de création de PDF,
'exception': 'Traceback (most recent call last): File "/usr/lib/python3/dist-packages/wcs/qommon/afterjobs.py", line 83, in run self.execute() File "/usr/lib/python3/dist-packages/wcs/backoffice/data_management.py", line 374, in execute data_instance.perform_workflow() File "/usr/lib/python3/dist-packages/wcs/formdata.py", line 521, in perform_workflow url = perform_items(wf_status.items, self) File "/usr/lib/python3/dist-packages/wcs/workflows.py", line 86, in perform_items url = perform_items(wf_status.items, formdata, depth=depth - 1) or url File "/usr/lib/python3/dist-packages/wcs/workflows.py", line 86, in perform_items url = perform_items(wf_status.items, formdata, depth=depth - 1) or url File "/usr/lib/python3/dist-packages/wcs/workflows.py", line 86, in perform_items url = perform_items(wf_status.items, formdata, depth=depth - 1) or url File "/usr/lib/python3/dist-packages/wcs/workflows.py", line 71, in perform_items url = item.perform(formdata) or url File "/usr/lib/python3/dist-packages/wcs/wf/create_formdata.py", line 436, in perform new_formdata.perform_workflow() File "/usr/lib/python3/dist-packages/wcs/formdata.py", line 521, in perform_workflow url = perform_items(wf_status.items, self) File "/usr/lib/python3/dist-packages/wcs/workflows.py", line 86, in perform_items url = perform_items(wf_status.items, formdata, depth=depth - 1) or url File "/usr/lib/python3/dist-packages/wcs/workflows.py", line 71, in perform_items url = item.perform(formdata) or url File "/usr/lib/python3/dist-packages/wcs/wf/export_to_model.py", line 731, in perform self.perform_real(formdata, formdata.evolution[-1]) File "/usr/lib/python3/dist-packages/wcs/wf/export_to_model.py", line 734, in perform_real outstream = self.apply_template_to_formdata(formdata) File "/usr/lib/python3/dist-packages/wcs/wf/export_to_model.py", line 498, in apply_template_to_formdata return transform_to_pdf(outstream) File "/usr/lib/python3/dist-packages/wcs/wf/export_to_model.py", line 110, in transform_to_pdf stderr=subprocess.PIPE, File "/usr/lib/python3.7/subprocess.py", line 472, in run with Popen(*popenargs, **kwargs) as process: File "/usr/lib/python3/dist-packages/sentry_sdk/integrations/stdlib.py", line 187, in sentry_patched_popen_init rv = old_popen_init(self, *a, **kw) File "/usr/lib/python3.7/subprocess.py", line 775, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.7/subprocess.py", line 1412, in _execute_child errpipe_read, errpipe_write = os.pipe() OSError: [Errno 24] Too many open files
(il peut y avoir des fd leakés ailleurs, mais prenons celui-ci ici).
(on peut aussi chercher voir comment augmenter le nombre de fd autorisés, ici l'erreur me semble quand même avoir été levée relativement tôt).
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a environ 3 ans
- Fichier 0001-workflows-close-pdf-file-after-reading-51881.patch 0001-workflows-close-pdf-file-after-reading-51881.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
(on lit déjà totalement le fichier en mémoire dans d'autres situations, ça va passer là aussi)
Mis à jour par Thomas Noël il y a environ 3 ans
- Statut changé de Solution proposée à Solution validée
Mis à jour par Frédéric Péters il y a environ 3 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit 74c9e66d6abcb9a7a71088f2fa789d5d2ba30455 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Wed Mar 10 17:05:00 2021 +0100 workflows: close pdf file after reading (#51881)
Mis à jour par Frédéric Péters il y a environ 3 ans
- Statut changé de Résolu (à déployer) à Solution déployée
workflows: close pdf file after reading (#51881)