Skip to content
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

Big queues, etc. can break if requests don't finish loading. #634

Open
Roy-Orbison opened this issue Oct 25, 2021 · 0 comments
Open

Big queues, etc. can break if requests don't finish loading. #634

Roy-Orbison opened this issue Oct 25, 2021 · 0 comments

Comments

@Roy-Orbison
Copy link
Contributor

I couldn't find any instance of the ignore_user_abort PHP function when grepping the code. To me, that signifies a user must wait until every page loads and every request fully completes (which can be a long time for big sends with a small machine), and they can never get a network interruption nor a power failure, otherwise PlaySMS will simply crash and be left in an inconsistent state (e.g. a stuck queue). For read operations it doesn't matter but write operations should complete unless the user sends a "stop doing that" request to the app. I can see why one would want to be able to cancel a send, but surely that should be done explicitly rather than closing a browser tab and hoping for the best.

Sends could be cancelled by deleting the relevant outbox records and .txt files, then changing the queue's flag field. It's a simple thing to add but then creates challenges if you want to allow control of, or present status information on currently processing requests.

This isn't just theoretical, we've had large sends (as in tens of thousands of messages) fail because of this. I've had to manually clean up the database after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant