eikek / docspell

Assist in organizing your piles of documents, resulting from scanners, e-mails and other sources with miminal effort.
https://docspell.org
GNU Affero General Public License v3.0
1.58k stars 119 forks source link

Importing emails is stuck #2113

Closed iszhi closed 9 months ago

iszhi commented 1 year ago

I imported work emails from the past 4 years. However the number of emails is definitely not as much as 40k. Not sure what went wrong. Now this task runs daily and never seems to run out. What should I do? image

eikek commented 1 year ago

The number shows the amount of queued jobs. If it is >40k probably that many jobs have been submitted. Can you give some details about the task that fails/is stuck? Are there logs? How many job executors do you have configured?

iszhi commented 1 year ago

@eikek I only have one job executors on my old PC (6300HX+12Gb memory). I just import the last 3 years emails. I think the total number of emails is only up to thounds. Why there are more than 40K jobs submitted? The following showed a stucked job from yesterday. image

iszhi commented 1 year ago

Or, is there a way to reset it? or rerun the jobex?

eikek commented 1 year ago

Hey @iszhi why there are so many jobs I can't say. Somehow they got submitted. Perhaps something was run multiple times? If there is one executor, one blocking would then block all others as well. The logs indicate that some HTML->PDF conversion was not successful. Are there any really large files being processed? You could try the weasyprint command manually to see what the errors are. The jobs take very long, perhaps due to large files and not a very strong machine. But eventually the original file can be downloaded from the webui.

Unfortunately, there is no realy way to clear the whole job queue. But you can cancel any job from the webui. Those not already started will be removed from the queue. You can also stop docspell and I can give you a SQL statement to delete all jobs if you like.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. This only applies to 'question' issues. Always feel free to reopen or create new issues. Thank you!

iszhi commented 1 year ago

@eikek, Recently, I got time to see my library again. I realized that all jobs were finished actually. I'm able to upload new documents into the library. The only problem is that the item number should be 0 instead of 54608. image

Is there is way to normalize this value?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. This only applies to 'question' issues. Always feel free to reopen or create new issues. Thank you!