Skip to Content

Nginx configuration for SAP SMP - disconnection (11)

We are using Nginx to make SMP accessible for mobile devices from the internet. Nginx has been configured with a certificate and all is up and running.

When using the SAP Work Manager, we get this error when doing a full sync:

Updating complex table ‘ctMaterialStorageLocation’...
Field Definitions received
Index Definitions received – rebuilding
Unexpected disconnection from server (11)
'Angel' connection failed
Ending transmission

This only happens when connection through Nginx, a full sync can be done repeatedly when using a VPN and connecting directly to the SMP server (which seems to indicate that the issue is somewhere in Nginx).

The configuration of Nginx is pretty straight forward:

worker_processes auto;
events {
worker_connections 1024;
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 443 ssl;
server_name <name>;
ssl_certificate <path>/Nginx_Certificate.cer;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_timeout 15m;
access_log <path>/access_443.log;
error_log <path>/error_443.log;
root html;
index index.html index.htm;
location / {
proxy_pass https://<SMP Server FQDN>:8081/<application>;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect default;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header localhost $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

Are we missing some key Nginx configutration here, or what could the issue be? Amy thoughts are greatly appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 23, 2018 at 07:26 AM

    Hello all,

    For future reference: the parameter "proxy_read_timeout" of Nginx needs to be set to a value higher that the highest expected wait time for an answer from SMP/backend. If it is set too low, Nginx will think the session as stale (no answer from the proxied server within the set time) and terminate the connection. SAP will add this to their documentation of Nginx in an SMP environment.

    Kindest rehards, Wilbert

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 12, 2018 at 03:29 PM


    Judging from when your error 11 occurs I'm not sure it is an issue with the proxy directly. What do the logs show when that disconnection occurs while building that table? How long is the table taking to build? It could be a timeout situation.



    Add comment
    10|10000 characters needed characters exceeded

  • Jan 13, 2018 at 04:27 PM

    My guess would be that the ct is taking too long to build and Nginx is timing out and closing the connection while the transmit is still in process.


    Add comment
    10|10000 characters needed characters exceeded