-
Notifications
You must be signed in to change notification settings - Fork 126
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
Foreign key constraint violation (attachment_source_file_id_fkey) #530
Comments
Hi and thanks for reporting! This is bad… can you give more details how you triggered this error? Can you process new files, or is nothing working right now? |
Could you give some more log lines around the error, too? What type of file was it (zip, eml, pdf)? Sorry for all the questions :-) trying to reproduce it. |
Nothing is working right now. This is a log from different file, but with the same result. I tried it on some JPEGs and some single / multipage PDFs, some scanned, some with proper text. The result seems to be the same for me. It seems like the application is recognizing files as a duplicate of something, but it is completely fresh install and I double checked that I haven't tried to import the same file twice.
The processing is now in infinite loop of text analysis. I am even unable to cancel the job. Hope it helps. |
Ok, the infinite looping of text analysis is unrelated. I tried fresh install again. I wanted to try to upload the files without the "Skip files already present in docspell" option, because I suspected that it might be the culprit. Now it passes the point when it was complaining about foreign key, but I am stuck in the infinite text analysis :( |
Is it possible that docspell was restarted in between processing? These lines look like it was stopped:
There are 9sec in between. And it starts with the first step in processing (checking for existing files). I think then, when restarting it wants to check for duplicates (which it shouldn't) which results in errors. Did you restart it manually? I never observed infinite loops in text analysis, but it may take a while especially on slower machines. Did the analysis never return? Is this some "special" machine, the raspberry pi or anything like that? |
I don't think so. I have definitely not restarted the process manually so unless it died for some reason and got restarted by docker automatically, then no. But nothing in the log gives me any sign of the process dying. Can double check it though, if you think it is the case. I was trying it out on my dev machine which is rather beefy. So no PI. Job never succeeded for me so I am not exactly sure what should analysis return. It just repeats over and over for me (repeating the same log entries you have quoted). |
That is strange, I cannot explain what that is. These lines I quoted indicate that the process stops and gets restarted. I can reproduce the foreign key problem when I kill joex in the middle of processing and start it up again. (which is a bug that I'm fixing now) I currently suspect that the "endless loop" is caused by restarting the process so it can never finish. The line |
Ok, your message got me double check what was happening. You were right! The JOEX container was indeed getting killed by OOM. I recently run some docker update on my machine and it seems to set limit for docker VM to 1G for some reason 🤔 After rising that crazy limit I was able to finish without a problem 👍 Thank you for your prompt reaction which put me on the right path. Shall I dig deeper into the original foreign key issue, or do you already have all you need? |
Btw. it might be good idea to add some log on the process start so that this kind of problems would be bit easier to debug. I suspect that your project has potential to be run on PIs and similar low-powered devices in home labs. |
Ah thanks, nice to hear you found it! Yes the joex currently needs quite some memory. 1.5G is ok, but 1G is just not enough. I will try to bring that down eventually, this is currently needed by NLP algos. And you're right, I'll add a more prominent log line that marks the start of processing, so this is easier to spot. I think I have all I need to fix the fk problem. Thank you a lot! |
Hello guys,
I wanted to try out docspell and got stuck unable to process any files (tried several).
Here is a snippet from the log:
I have used docker-compose from the repo with unmodified configuration. The version is 0.17.1 (joex-LATEST / 3e4973159aff).
The text was updated successfully, but these errors were encountered: