craftcms / feed-me

Craft CMS plugin for importing entry data from XML, RSS or ATOM feeds—routine task or on-demand.
Other
286 stars 139 forks source link

Jobs get stuck at 99% or 100% and never clear queue #1309

Closed justinholtweb closed 1 year ago

justinholtweb commented 1 year ago

Description

Jobs get stuck at 99% or 100% and never clear queue, causing other queue jobs to back up behind them. The jobs remain in an active state but appear to have finished according to the Feed Me log, so I'm not sure if this is due to my queue or Feed Me.

Notes: The site uses a custom value of 900 seconds for Feed Me TTR to allow larger jobs to finish. The site also has Async Queue in use.

Steps to reproduce

  1. Configure Feed Me to use 900 seconds for TTR.
  2. Start an import job (either via URL by cron job OR manually starting a job from the Feed Me interface.)
  3. Run a job and watch it hit 99% or 100% but never clear queue.

Additional info

justinholtweb commented 1 year ago

Turns out this appears to be an issue with Async Queue. When it is disabled and I process queue runners with a cron job every minute the jobs clear off with no problem. Closing this issue as unrelated to Feed Me.

justinholtweb commented 1 year ago

If anyone else runs into this I ended up hitting this bug again even with Async Queue disabled. The feed data I am having to work with is extremely large, the JSON is almost 198k lines long, and is provided by a third party so we don't have scope to reduce it (it is uploaded to the site via FTP by the provider 2 times a day). I ended up tweaking some SQL settings (I set BUFFER POOL SIZE to 1024MB, LOCK WAIT TIMEOUT to 120 seconds and WAIT TIMEOUT to 48800 seconds (default for that is 28800 seconds) and I finally got feeds to finish and clear. If you run into this yourself try editing those SQL settings to hopefully resolve.