-
Notifications
You must be signed in to change notification settings - Fork 460
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
Set dynamic memory limit in pdfalto_server #1038
Conversation
Tested successfully with docker too. The memory limit is used by the docker service and a pdfalto subprocess for a large PDF is killed as expected. |
@lfoppiano I made the change to the pdfalto_server script for macos too, but I can't test it. Could you check maybe? |
I tested on M1, it seems to work by setting 6M as maximum memory for pdfalto.
Does this correspond to the expected behaviour? |
Thank you ! yes this is the expected failing exception when subprocess is OOM and killed |
I just realised that I did not really test on the M1 macos but on Linux 😅 However, the ulimit is commented because it fails to set the limit:
|
Ha yes I modified only the old mac ones Maybe changing the ulimit on latest macos requires sudo? |
I need to investigate more, however, for mac on intel works without issue. Just tested. |
This is a fix for #1036
The memory limit for the pdfalto subprocess was only set for batch mode, not for server mode.
This PR pass the memory limit defined in the Grobid configuration file to the
pdfalto_server
script, which set the ulimit before creating the pdfalto subprocess.Tested successfully with the java server.
todo: to be tested with Docker.