Invitations excruciatingly slow to send

Description

Our code for sending invitations appears to be struggling at least some of the time, so ideally we can determine why and optimize the process.

For manual testing, the best we can do is make sure both the "Send invite codes to people in our invitations queue" option and the task we use for the automated queue work. Then we'll see if things are better on production.

"Send invite codes to people in our invitations queue" option

Full details, although I am certain not all are relevant:

  • We started with these settings: Account creation enabled, Account creation requires invitation, and Invite from queue enabled. The "Number of people to invite from the queue at once" was set to 15,000, "How often (in days) should we invite people from the queue" was set to 1, and "How many weeks you have to activate your account before we purge it" was set to 2.

  • The Manage Queue page showed 4,053 as the position of the last user in the queue.

  • On the admin invitations/Invite New Users page, the text in the "Send invite codes to people in our invitations queue" section said, "There are 4037 requests in the queue."

  • Eight more people joined the queue.

  • At about 06:00 UTC, an admin entered 4061 (4053 + 8) in the "Number of people to invite" field.

  • The admin then went to the settings page and unchecked "Invite from queue enabled" and set "Number of people to invite from the queue at once" to 1.

The invitations began to slowly go out. No, I mean slowly: about one invitation was sent every half hour. As of 23:10 UTC later that day, "Send invite codes to people in our invitations queue" said, "There are 3933 requests in the queue" and the Manage Queue page showed the last user with a position of 3947.

That's 114 invitations sent in 17 hours, or an average of about 7 an hour.

This option only sees occasional use, so we're not sure if this is always a problem.

The automated queue

This is with the same invitation-related admin settings.

PAC chair Matty reports that the invitations can be slow to send with this option as well and notes, "there have been a few days when they didn't go out at all, but those have been very sporadic. and some days when only some of them went out, but again, that's very sporadic. I have noticed lately that it's a lot slower than it used to be."

Assignee

Unassigned

Reporter

Sarken

Roadmap

Invitations

Priority

Medium

Affects versions

Fix versions

None

Components

BackEnd

Difficulty

Medium

Required Access Level

Admin

Milestone

Internal 0.9
Configure