How to increase more than 5 requests at a time in nginx from the same IP

463 Views Asked by At

We have a Laravel application running in local MacOS using valet.

We have a script that takes more than 5 hours(for example) to execute. Now, we want to hit a same url that run that time consuming script from 10 tabs of the browser or using curl-cli. We have already changed the timeout limit so a request taking more than 5 hours is not the problem.

The problem is that, the first 5 curl requests is doing what is being expected to be done. The request are actually modifying our database. But the any request after the 5th one, is not hitting the php script at all!

Seems valet's nginx configuration has a limit 5 request at a time from same ip. How can we fix this to higher? We have tired few configuration but none of them working. I am not much experienced with nginx config files. Here is the current nginx configuration file of valet(/usr/local/etc/nginx/nginx.conf):

user "imran" staff;
worker_processes auto;

events {
    worker_connections  1024;
}

http {
    include mime.types;
    default_type  application/octet-stream;

    sendfile on;
    keepalive_timeout  65;
    types_hash_max_size 2048;

    client_max_body_size 512M;

    server_names_hash_bucket_size 128;

    ssi on;

    gzip  on;
    gzip_comp_level 5;
    gzip_min_length 256;
    gzip_proxied any;
    gzip_vary on;
    gzip_types
    application/atom+xml
    application/javascript
    application/json
    application/rss+xml
    application/vnd.ms-fontobject
    application/x-font-ttf
    application/x-web-app-manifest+json
    application/xhtml+xml
    application/xml
    font/opentype
    image/svg+xml
    image/x-icon
    text/css
    text/plain
    text/x-component;

    include "/Users/imran/.config/valet/Nginx/*";
    include servers/*;
    include valet/valet.conf;
}

Thanks in advance.

0

There are 0 best solutions below