You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running SilverStripe in a LoadBalancer multi-server setup, the parallel uploads causes problems with unique key constraints due to the fast distribution of requests between different servers and one database connection.
With parallel uploads already being available in the dropzone module, it can be handy to be able to change this to prevent earlier said problems.
Additional context or points of discussion
To sketch a good picture in how this occurs with the setup I am currently running for a client:
WEB-01, WEB-02 as dedicated CMS/Frontend servers
LB-01 for load balancing all the requests
DB-01 (with a slave setup)
We are seeing every /upload request being distributed towards WEB-01 and WEB-02 simultaneously causing request 1 being correctly saved, but request 2 fail because of the duplicate key constraints.
I haven't looked into this very deeply though based on this answer it may be that we want to make it so that uploadMultiple is configurable to false instead
The package uses version 6.0.0-beta.2 of Dropzone. uploadMultiple would mean there will be multiple files inside one request, which is different compared to parallelUploads which result in two parallel requests. Changing the uploadMultiple to true would probably break the PHP upload field because of different behaviour.
Description
When running SilverStripe in a LoadBalancer multi-server setup, the parallel uploads causes problems with unique key constraints due to the fast distribution of requests between different servers and one database connection.
With parallel uploads already being available in the dropzone module, it can be handy to be able to change this to prevent earlier said problems.
Additional context or points of discussion
To sketch a good picture in how this occurs with the setup I am currently running for a client:
We are seeing every
/upload
request being distributed towards WEB-01 and WEB-02 simultaneously causing request 1 being correctly saved, but request 2 fail because of the duplicate key constraints.Validations
PRs
The text was updated successfully, but these errors were encountered: