502 Bad Gateway error while "View Issues"

Get help from other users here.

Moderators: Contributor, Developer

Post Reply
rtartas
Posts: 8
Joined: Sep 21, 2010 7:23 am

502 Bad Gateway error while "View Issues"

Post by rtartas » Dec 02, 2015 4:11 am

Hi,

For one of my projects created in Mantis, when I press "View Issues" I receive error message:
502 Bad Gateway
nginx/1.6.2
I use MantisBT version 1.2.19.
Any idea how to solve it?
Thanks in advance for help!

rtartas
Posts: 8
Joined: Sep 21, 2010 7:23 am

Re: 502 Bad Gateway error while "View Issues"

Post by rtartas » Dec 10, 2015 4:05 am

Hi,

Can anybody help with this error?

atrol
Site Admin
Posts: 7204
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: 502 Bad Gateway error while "View Issues"

Post by atrol » Dec 10, 2015 4:19 am

This is hardly a Mantis problem, but a problem with your webserver setup.

Search the web for "502 bad gateway nginx" and you will find a lot of hints what might cause the issue, e.g. links like
http://jvdc.me/fix-502-bad-gateway-erro ... ading-php/
Please use Search before posting and read the Manual

sergeyol
Posts: 2
Joined: Apr 12, 2018 4:51 am

Re: 502 Bad Gateway error while "View Issues"

Post by sergeyol » Apr 12, 2018 5:05 am

We also have 502 error in several scenarios:
1) Opening "View Issues" in some cases
2) Opening issue that has specific long URLs anywhere in the description or a comment line (e.g. typical SharePoint link).

I would kindly not agree that this is an issue totally unrelated to Mantis. Analysis of logs (PHP, Apache etc.) shows that PHP process is restarting during such call:

[Thu Apr 12 13:02:55 2018] [notice] Parent: child process exited with status 255 -- Restarting.
[Thu Apr 12 13:02:57 2018] [notice] Apache/2.2.22 (Win32) PHP/5.3.11 mod_ssl/2.2.22 OpenSSL/0.9.8t configured -- resuming normal operations
[Thu Apr 12 13:02:57 2018] [notice] Server built: Jan 28 2012 11:16:39
[Thu Apr 12 13:02:58 2018] [notice] Parent: Created child process 5620
[Thu Apr 12 13:03:00 2018] [notice] Child 5620: Child process is running
[Thu Apr 12 13:03:00 2018] [notice] Child 5620: Acquired the start mutex.
[Thu Apr 12 13:03:00 2018] [notice] Child 5620: Starting 64 worker threads.
[Thu Apr 12 13:03:00 2018] [notice] Child 5620: Starting thread to listen on port 443.
[Thu Apr 12 13:03:00 2018] [notice] Child 5620: Starting thread to listen on port 80.

I believe that Mantis thread crashes during preparation interpretation of a page, thus resulting in error 502.

atrol
Site Admin
Posts: 7204
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: 502 Bad Gateway error while "View Issues"

Post by atrol » Apr 18, 2018 2:22 am

@sergeyol are you able to reproduce this on latest Mantis version using a supported PHP version?

I vaguely remember that we had memory issues / PHP crashes in older Mantis versions, using older PHP versions when having long URLs in description or notes.

As you are using a quite outdated PHP 5.3.11, your problem might disappear by upgrading PHP, or changing PHP memory settings.
Please use Search before posting and read the Manual

sergeyol
Posts: 2
Joined: Apr 12, 2018 4:51 am

Re: 502 Bad Gateway error while "View Issues"

Post by sergeyol » Apr 26, 2018 5:59 pm

Thanks for the hint, for some reason I haven't considered PHP version. Just tried it with PHP 5.6/Apache 2.4 - error is still there. On the latest version of Mantis running as your demo environment, I was not able to reproduce it.

So I will try to upgrade first to PHP 7, and then to Mantis 2.x

Post Reply