ROUTE cookie value changes unexpectedly.
I have some long running processes in my app. Say uploading a list of 20k emails to db. I notice that the route cookie value changes after a long running session finishes and the user gets logged out becuase now the user is on different server.
I also noticed that sticky module does not respect the merge_slashes on directive. So http://example.com//a/xzy and http://example.com/a/ changes the value in route cookie. It does not add two cookies but just overwrites the cookie if the user cancels the operation. For eg: to print a page we have a link that pops up the printer dialogue if user cancels the dialog, cookie value changes and user gets logged out.
Any idea what can cause this?
Comments (9)
-
repo owner -
repo owner - changed status to open
-
reporter Sure pasted below. I have also tried using max_fails=2 fail_timeout=30s.. still same behaviour.
upstream prod { sticky path=/d; keepalive 64; server web:8080 weight=2 ; server web1b:8080 weight=2 ; server web1c:8080 weight=2 ; server web2:8080 weight=1 ; server web3:8080 weight=1 ; server web4:8080 weight=1 ; server web5:8080 weight=1 ; server web6:8080 weight=1 ; server web7:8080 weight=1 ; server web8a:8080 weight=2 ; server web8b:8080 weight=2 ; server web8c:8080 weight=2 ; server web9a:8080 weight=2 ; server web9b:8080 weight=2 ; server web9c:8080 weight=2 ; server web10a:8080 weight=2 ; server web10b:8080 weight=2 ; server web10c:8080 weight=2 ; }
-
reporter My nginx.conf is below
http { include mime.types; default_type application/octet-stream; client_max_body_size 20M; log_format main '$remote_addr - $server_port - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; sendfile on; #tcp_nopush on; variables_hash_max_size 1024; keepalive_timeout 90; merge_slashes on; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.1; gzip_comp_level 2; gzip_types text/plain application/x-javascript text/css application/xml *; gzip_vary on; include servers-nginx.conf; }
-
repo owner do you experience this behavior always or just sometimes?
for the second issue: please note, we changed the way for the path - defaults, so maybe with the new version your problems are gone
-
reporter We see this too often.. I will try the new version and let you know.
-
reporter There is definitely some issue with
merge_slashes on;
The cookie is changing if there are multiple slashes. I tested this with new version also.
-
repo owner -
assigned issue to
-
assigned issue to
-
-
assigned issue to
-
assigned issue to
- Log in to comment
could you paste your complete upstream_config?