502 Bad Gateway is displayed when configured at Administration-> Rules at admin's page

Hello,

I need a help to resolve the issue .

When I tried to configure rules from administration option, its showing an issue like 502 bad gateway.
When go through, Administration -> rules -> Select any Diabetes reminder. In that rule detail page, select an edit option from the Demographics filter criteria. Its showing like 502 bad gate way after click the edit option.

I’ve modified the nginx conf file and checked sql statements but it shows the same.

Server : nginx
System : Ubuntu 16.04
php level : php7.0-fpm

I need your suggestions to resolve this issue.

Regards
Marimuthu A