Mantis very slow

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
MaximB
Posts: 1
Joined: 01 Jun 2009, 09:58

Mantis very slow

Post by MaximB »

I've installed mantis-1.1.7-1.el5 with all it's deps (mysql, php etc...)

When I go to the https://myip/mantis/admin/ it runs very fast.
But when I go to the http://myip/mantis/login_page.php or https://myip/mantis/login_page.php it reacts very slowly, when I finally login and try to view issues or any other thing it also reacts unbearably slow.
I've disabled SSL in hopes that it might make things faster , but it didn't.

I use RHEL5.1 and took the rpm's for mantis and all deps from rhn channel.

What cases this slowness and how can I fix it ?
I suspect it might be the database (which is currently empty) but I don't know how to check what is wrong.
vboctor
Site Admin
Posts: 1293
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Re: Mantis very slow

Post by vboctor »

A couple of possible causes:

1. Are you using LDAP?
2. Some people had a similar issue and it turned out to be an Apache configuration issue. Not sure what exactly was the problem there.
Migrate your MantisBT to the MantisHub Cloud
elbIT
Posts: 1
Joined: 03 Feb 2010, 11:03

Re: Mantis very slow

Post by elbIT »

Hi,

I had the same problem and figured out a solution so I thought I'd share it in case anybody else comes across this issue.

Basically in your config file 'config_inc.php' find the line that checks the '$t_path' variable:

Code: Select all

if ( '/' == $t_path || '\\' == $t_path  || '' == $t_path) {
			$t_path = '~/';
		}
and change it to:

Code: Select all

	if ( '/' == $t_path || '\\' == $t_path || '' == $t_path || strstr  ( $t_path , '.php') != false) { 
			$t_path = '';
		}
basically what is happening is the $t_path stores the $_SERVER['PHP_SELF'] php server variable. But for some reason on IIS6 this server variable also has the filename of the document being served by the webserver (not sure if this can be changed in php.ini?). So for instance when you are logging in to Mantis: the $t_path will return:

Code: Select all

http://mymantisinstall.mylocaldomain.local/login_page.php
This results in all calls to other files/resources result in the 'filename' being included in the request. For example the CSS request for the login page will be:

Code: Select all

http://mymantisinstall.mylocaldomain.local/login_page.php/css/default.css 
Resulting in IIS getting confused and hanging for ages before timing out with I presume a 404 error.

By adding the extra check in the code above ( || strstr ( $t_path , '.php') != false) ) allows Mantis to find the resources it needs and get back up to speed.

However, I dont know if this affects any other part of Mantis and it may not be the best solution (if someone else has a better solution please let me know). For now however it is allowing me to use the system properly and at the speed i'd expect. Cheers.

All the Best


Nige
atrol
Site Admin
Posts: 8375
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Mantis very slow

Post by atrol »

Thanks for sharing this
Please use Search before posting and read the Manual
Post Reply