Rohit Raj Verma
Rohit Raj Verma

Reputation: 138

Ajax request is getting cancelled

In a php application. I am uploading 20-30 files at once. Each files is around 100-200MB. Means more than 2GB of data i am uploading on server. Because it takes time around 20-30 mins to upload. One general ajax pooling job getting cancelled after some time.

I have following configuration:

  1. upload_max_filesize = 4096M
  2. post_max_size = 4096M
  3. max_input_time = 600
  4. max_execution_time = 600

During this process my CPU consumption goes only upload 10-20%. I have 32 GB RAM and 12 CORE Linux machine.

Application is running on PHP 8.0, APACHE 2, MYSQL 8, Ubuntu 20.

Can anyone suggest what else i can check?

Upvotes: 0

Views: 135

Answers (1)

Soltuts
Soltuts

Reputation: 1

max_execution_time: This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser. This helps prevent poorly written scripts from tying up the server. The default setting is 30. When running PHP from the command line the default setting is 0.

max_input_time: This sets the maximum time in seconds a script is allowed to parse input data, like POST and GET. Timing begins at the moment PHP is invoked at the server and ends when execution begins. The default setting is -1, which means that max_execution_time is used instead. Set to 0 to allow unlimited time.

I think change it: max_input_time = 1800 & max_execution_time = 1800 (30 minutes)

Upvotes: 0

Related Questions