Skip to content

fix "Missing lock for job" errors and better concurrency handling for self host mode #1370

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ciekawy
Copy link

@ciekawy ciekawy commented Mar 21, 2025

I did that for my personal needs related to #1327, hope others can benefit from this

@FelixGYT
Copy link

First of all, thank you for your generosity. He has helped me a lot.
I deployed your code and it looks much better. There won't be any errors during 20 concurrent attempts.
But after about 20 concurrent requests on my end for a period of time, it still reports the error Job wait.
I checked the logs and found that the work log should have been successful, but there is a job wait issue in the API log.
I don't know if you have encountered the same problem, I'm curious why there is such a problem
微信图片_20250327165105
微信图片_20250327165110

@ciekawy
Copy link
Author

ciekawy commented Mar 27, 2025

unfortunately I have very little time and have no issues, while also it is working for my local instance and I use it daily (though not super intensively) - this should be debugged.

IMO extending lock itself is not an issue - same ID ls logged few lines below as done. May be worth checking logs from other containers (e.g. docker compose logs --follow - without container name shows from all and observe - they will be more in sync ) - I'd guess some jobs might possibly get stuck in playwright or something, but definitly timeout should be better handled. So the error might actually be real.

One thing is that all containers, playwright specifically may need more RAM (may require changing either global docker, or whats assigned to specific container).

BTW PLEASE always copy text, not screen :)

@ciekawy
Copy link
Author

ciekawy commented Mar 27, 2025

Also both Error in scrapeController and Job wait are logged from https://github.com/mendableai/firecrawl/blob/e799cf206b5d357158d242f4dcec76943f47194d/apps/api/src/controllers/v1/scrape.ts - not even subject to my PR - this would need further investigation. You could use LLM (preferably Claude Sonnet 3.7 thinking for this), sharing also relevant source files and relevant logs from all containers around the time the error occur

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants