Concurrent Executions of The Same Server Action

I have a server action which calls an external service to send and email and writes multiple records to the database. Overall it takes around 3 seconds to run.

I would like a user to be able send an email to one contact and while the server action for that is still running, send an email to another contact (using the same server action). However this doesn’t work and both server actions fail.

Is there a solution to this dilemma?

Am using PHP and MySQL.

Community Page
Last updated: