Large number of queued jobs

(Leo) #1

I’m creating huge number of topics in parallel via api, which has slowed down our forum incredibly. I’ve noticed several jobs are queued in sidekiq. Is this could be the reason? what sidekiq jobs are required for posts creation? fyi I’ve disabled sending emails.

I’m using discourse default settings for no. of sidekiq workers and database connections. Any advice for how much should I increase of any resource?

              total       used       free     shared    buffers     cached
Mem:          7983       6865       1118        278         60       3580
-/+ buffers/cache:       3224       4759
Swap:            0          0          0

(Felix Freiberger) #2

This is normal – Discourse does some processing asynchronously, like sending notifications if necessary, or downloading remote images.

You can watch the progress by going to /sidekiq/queues?poll=true – you should see the queues and their (hopefully decreasing) sizes.

If you want to speed up this processing, consider raising the number of Sidekiq workers until allmost all RAM is used. :slight_smile:

(Leo) #3

Thanks for clarifying. Adding more sidekiq workers would be better.

sending notifications if necessary. How can I disable notifications and already queued notifications? I don’t want the users to be notified with bunch of notifications. I’ve already disabled emails by site settings.

(Felix Freiberger) #4

If the posts have already been created, it’s already too late to properly manage notifications – your users will be notified as if these posts had been created normally (on mention, if mailing list mode is enabled, …).

If you only want to prevent emails, disabling all outgoing mail should also work for already queued notifications, I think.

(Leo) #5

I’ve disabled email notifications. I’m referring to desktop notifications, the one that appears on top right with avatar dropdown.

(Felix Freiberger) #6

Users should only get them if they are watching the category, and these should have been sent out already because they are not delayed like emails.