Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

bitbucket throwing 503 error after running 24 hours

Eric Seibert November 12, 2018

Rhel7.3 running bitbucket 5.15.0 with Nginx proxy runs fine for a day but after 24 hours or so it starts throwing 503 errors out of the blue.

I'm not seeing any errors  out of the ordinary and my nginx.conf file is as follows:

 

events {
worker_connections 512;
}

http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;

include /etc/nginx/mime.types;
default_type application/octet-stream;

include /etc/nginx/conf.d/*.conf;

server {
listen 80;
server_name bitbucket.chop.edu;
rewrite ^ https://bitbucket.chop.edu$request_uri? permanent;

}

client_max_body_size 0;

server {
listen 443;
listen [::]:443;
server_name bitbucket.chop.edu;

ssl on;
ssl_certificate /etc/nginx/certs/bitbucket.crt;
ssl_certificate_key /etc/nginx/certs/bitbucket.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;

location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:7990;
proxy_redirect off;
proxy_connect_timeout 300;
}

location /bitbucket {
proxy_pass http://localhost:7990;

proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;

proxy_redirect off;

client_max_body_size 10m;
client_body_buffer_size 128k;

proxy_connect_timeout 90s;
proxy_send_timeout 90s;
proxy_read_timeout 90s;

proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}


}
}

 

 

1 answer

0 votes
Dave Theodore [Coyote Creek Consulting]
Community Champion
November 12, 2018

Is Bitbucket still running? I would expect to see a 503 when nginx can't talk to Bitbucket.

Eric Seibert November 13, 2018

Yes bitbucket is running but restarting nginx doesn't resolve it and I have had to restart both bitbucket and nginx to get back to it. I've tried just restarting nginx but it results in a 502 or 503 error. 

I am not seeing any funny errors from either, soi I suspect it might have something to do with the vm/os 

Dave Theodore [Coyote Creek Consulting]
Community Champion
November 13, 2018

If your OS has SElinux enabled, try setting it to permissive mode and restarting both nginx and Bitbucket.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events