System error

error:  <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>
context: 
... 
211:  my $res = $ua->post( $url,\%args);
212:  my $response;
213:  $response = $res->content();
214:  if (! $res->is_success) {
215:  die $response;
216:  }
217:  my $json_encoded = $response;
218:  $data = decode_json($json_encoded);
219:  $memd->set($mem_key , $data , $memd_ttl) if($memd_enabled);
... 
code stack:  /opt/masonapache/lib/perl_lib/Website.pm:215
/var/www/virtual/joomla.trade-india-local.com/htdocs/lokpal/global.html:3
/var/www/virtual/joomla.trade-india-local.com/htdocs/lokpal/autohandler.html:4
/var/www/virtual/joomla.trade-india-local.com/htdocs/syshandler.html:80
raw error






























<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>


Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('<html>^M^J<head><title>502 Bad Gateway</title></head>^M^J<body>^M^J<center><h1>502 Bad Gateway</h1></center>^M^J<hr><center>nginx</center>^M^J</body>^M^J</html>^M^J') called at /opt/masonapache/lib/perl_lib/Website.pm line 215
Website::get_profile('Website=HASH(0xaa4f898)') called at /var/www/virtual/joomla.trade-india-local.com/htdocs/lokpal/global.html line 3
HTML::Mason::Commands::__ANON__ at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xaa4fcd8)') called at /usr/share/perl5/HTML/Mason/Request.pm line 1278
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1268
HTML::Mason::Request::comp(undef, undef) called at /var/www/virtual/joomla.trade-india-local.com/htdocs/lokpal/autohandler.html line 4
HTML::Mason::Commands::__ANON__ at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xaa11268)') called at /usr/share/perl5/HTML/Mason/Request.pm line 1278
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1268
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/share/perl5/HTML/Mason/Request.pm line 937
HTML::Mason::Request::call_next('HTML::Mason::Request::CGI=HASH(0xa9c9528)') called at /var/www/virtual/joomla.trade-india-local.com/htdocs/syshandler.html line 80
HTML::Mason::Commands::__ANON__ at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xaa44450)') called at /usr/share/perl5/HTML/Mason/Request.pm line 1273
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1268
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/share/perl5/HTML/Mason/Request.pm line 467
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 467
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 419
HTML::Mason::Request::exec('HTML::Mason::Request::CGI=HASH(0xa9c9528)') called at /usr/share/perl5/HTML/Mason/CGIHandler.pm line 193
eval {...} at /usr/share/perl5/HTML/Mason/CGIHandler.pm line 193
HTML::Mason::Request::CGI::exec('HTML::Mason::Request::CGI=HASH(0xa9c9528)') called at /usr/share/perl5/HTML/Mason/Interp.pm line 342
HTML::Mason::Interp::exec(undef, undef) called at /usr/share/perl5/HTML/Mason/CGIHandler.pm line 122
eval {...} at /usr/share/perl5/HTML/Mason/CGIHandler.pm line 122
HTML::Mason::CGIHandler::_handler('My::CGIHandler=HASH(0xa9c1448)', 'HASH(0xa44bd48)') called at /usr/share/perl5/HTML/Mason/CGIHandler.pm line 63
HTML::Mason::CGIHandler::handle_request('My::CGIHandler=HASH(0xa9c1448)') called at /opt/masonapache/lib/perl_lib/Website.pm line 1794
eval {...} at /opt/masonapache/lib/perl_lib/Website.pm line 1793
My::CGIHandler::handle_request('My::CGIHandler=HASH(0xa9c1448)') called at mason_handler.cgi line 22