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

[BUG] Worker timeout when importing BOM #2497

Closed
1 of 2 tasks
markusEmm123 opened this issue Jan 4, 2022 · 4 comments
Closed
1 of 2 tasks

[BUG] Worker timeout when importing BOM #2497

markusEmm123 opened this issue Jan 4, 2022 · 4 comments
Labels
bug Identifies a bug which needs to be addressed question This is a question

Comments

@markusEmm123
Copy link

Describe the bug
When i upload a BOM with more than ~30 items i get a browser error, probably because of a timeout.

Steps to Reproduce
(German version running here, hopefully my guesses for the english names are correct.)

Steps to reproduce the behavior:
Create a new part.
Select "upload BOM".
Select the file "BOM_long.csv"
BOM_long.csv

Click "File uploaded"
Leave automatic allocation as follows:

  • Part->Part_Name
  • Quantity per PCB -> Quantity
  • References -> Reference
  • IPN -> Part_IPN
  • everything else is not assigned

Click "Transmit selection".
Wait.
Experience browser error "host has not sent any data".

Docker protocol says
[2022-01-04 15:06:28 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:4598)
[2022-01-04 15:06:28 +0000] [4598] [INFO] Worker exiting (pid: 4598)
[2022-01-04 15:06:29 +0000] [4717] [INFO] Booting worker with pid: 4717
at that moment and restarts correctly.

I have 65 different parts in my library (all with pictures and price breaks from differen suppliers), that should hopefully not be the problem.

Expected behavior
Behaviour should be as documented for BOM upload.
It works as expected with a shorter list (30 instead of 60 items), BOM_short.csv.
BOM_short.csv

Deployment Method

  • Docker on Synology
  • Bare Metal

Version Information

InvenTree-Version | 0.6.0 dev
Commit-Hash | 95db82a
Commit-Datum | 2021-12-12

I do understand if this is a timeout problem and i have no problem with waiting for the import, but where is that timeout set and how can i increase it?

@markusEmm123 markusEmm123 added bug Identifies a bug which needs to be addressed question This is a question labels Jan 4, 2022
@SchrodingersGat
Copy link
Member

Sounds like this is a duplicate of #2331 - there is a known issue importing BOMs which will be fixed for the stable 0.6.0 release.

@markusEmm123
Copy link
Author

Is there a workaround until the release of 0.6.0 stable?
I understand that it takes a long time for huge databases but i have less than 100 parts in my DB.
Could anyone suggest a way to e.g. increase the timeout in the docker installation or give me a hint what part of the installation exactly runs into timeout?

@SchrodingersGat
Copy link
Member

@markusEmm123 no fix currently, sorry. On my install, it is the nginx proxy that times out, but in your case it appears the gunicorn (web server) timeout is being hit - you could try increasing that for now?

@markusEmm123
Copy link
Author

@SchrodingersGat
thank you for the advice. At first i saw no difference after setting a timeout in gunicorn.conf.py.

For anyone who might encounter the same behaviour:
After some searching i realized that there are two files with that name in the docker installation.

The timeout entry in ~/InvenTree/gunicorn.conf.py didn't change anything.

After adding a timout entry of >30 seconds (300 in my case) to ~/docker/gunicorn.conf.py [1] it works for me now.

[1] only vi is available in this/my docker install.
As i had to google for vi instructions, here is a short step by step instruction:
cd ~/docker
vi gunicorn.conf.py
i (to set VI to insert mode)
cursor keys to the last line, add
timeout = 300
esc key to leave insert mode
:w enter to save
:q to quit
restart docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Identifies a bug which needs to be addressed question This is a question
Projects
None yet
Development

No branches or pull requests

2 participants