0

I am running nginx latest docker image to access nginx.

I have 2 jenkins jobs triggered at the same time - which make a GET request to nginx and get the data. When the two jobs ran at the same time, I see only one job fetching the data and the other one is getting a 404 error.

When I give a 10 minutes gap between triggering the jobs, I get a response for both of the jobs.

Is this something I can change in the configuration of nginx? Or what else can I do?

server {
   listen    80;
   server_name _;
   client_max_body_size 10M;
   location /api/ {
       proxy_set_header  X-Real-IP        $remote_addr:80;
       proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for:80;
       proxy_set_header  Host $host:80;
       proxy_redirect off;
       proxy_read_timeout 300;
       rewrite    /api/(.*) /$1 break;
       proxy_pass http://backend:8080;
     }

  }

server {
    listen   81;
    server_name _;
    location / {
        proxy_pass http://backend:8081;
    }
 }


server {
   listen 443 ssl;
   server_name _;
    ssl_certificate /etc/ssl/certs/allure-ssl.pem;
    ssl_certificate_key /etc/ssl/private/allure-ssl.key;
    location /results/ {
    }

}

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.