Jump to content

Strange timeouts in admin area when adding a client


Recommended Posts

Add I've not noticed that it hangs when deleting clients as I'm deleting my test accounts !

onestopad - sorry to hear that.

 

Well I have to say that this is one confusing bug. Having moved my installation to a subdirectory, editing the DB manually to change the http and https URLS, and then moving back to the root directory, again editing URLs in the DB - I now find that my admin system has stopped hanging - even without the clientsadd.php conditional clause in the SSL rewrite / .htaccess.

 

So basically I now have a WHMCS that is working fine with this in my /admin/.htaccess:

RewriteEngine On
RewriteCond %{HTTPS} off
#RewriteCond %{REQUEST_URI} !^clientsadd.php$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

I am extremely confused now. :?

 

But at least my admin area is SLL protected and there are no more timeouts - with adding or deleting clients.

Link to comment
Share on other sites

I'm running my WHMCS in a completely separate hosting environment to my normal web site - it's a subdomain, but not contained within the cPanel account of my main public web site - ie. it's running within a separate account space of it's own.

 

I have done this as I want to be able to run my WHMCS installation on a different server to my public web site. WHMCS will eventually be running within it's own dedicated server space, separate to all of my other servers where I host my client's sites. This will ensure that my ticketing / support system is available, even if the server that my web site is hosted on happens to be offline for whatever reason.

Link to comment
Share on other sites

ahh using that htaccess has worked a treat - I must have copied the wrong one before as I missed out:

#RewriteCond %{REQUEST_URI} !^clientsadd.php$

Super... I'm working fine -thanks for your help nitro!

Cool - do you have that line in there as:

#RewriteCond %{REQUEST_URI} !^clientsadd.php$

or like this:

RewriteCond %{REQUEST_URI} !^clientsadd.php$

If it's the former then the rule is commented out and should not be having any effect.

Link to comment
Share on other sites

Yep I know - it is strange but I have this in my .htaccess file:

 

RewriteEngine On 
RewriteCond %{HTTPS} off
#RewriteCond %{REQUEST_URI} !^clientsadd.php$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

 

Even though it is commented out if I take out the clientsadd rewrite the system hangs. If I have it in there, commented out, it works fine :S

Link to comment
Share on other sites

But at least my admin area is SLL protected and there are no more timeouts - with adding or deleting clients.

D'OH! Spoke to soon. Adding the trailing slash to the general config for http and https domains has caused the problem to reappear... well something had casued it to reappear at any rate. It took a little while - I guess that this is due to smarty caching issues.

 

I'm now sitting here waiting for another timeout.

 

Well I can't afford to waste any more time on this. I think that the real solution here is for the developers to have a look in to what might be causing this problem - or even better to allow us to specify if we want to have our admin systems running on SSL via a checkbox in the WHMCS general configuration, rather than forcing us to look in to .htaccess type voodoo.

 

FYI - my current .htaccess voodoo that I've resorted to until there is an official fix is as follows:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^clientsadd.php$
RewriteCond %{REQUEST_URI} !^clientssummary.php$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Link to comment
Share on other sites

Can anyone advise if there are any other processes that run as a part of adding a client / deleting a client? Does WHMCS do any checks with the configured servers to see if any accounts exist that conflict with those details?

 

onestopad - that is weird that you get timeouts with SSL off - I thought I had narrowed it down fairly conclusively to being related to SSL being forced on in admin area. That's what it seems to be for me at any rate.

 

Ah well - I'm really going to leave this alone now until someone has something closer to a solution on offer. I must stop getting sidetracked by irritating bugs. :P

Link to comment
Share on other sites

he he I know what you mean about getting sidetracked.

 

I always time out to the "updrage in progress screen". Fortunately I dont have to add or delete clients manually too oftern but I agree that it should be an option in general config to have ssl on admin.

 

Ad

Link to comment
Share on other sites

I always time out to the "updrage in progress screen". Fortunately I dont have to add or delete clients manually too oftern but I agree that it should be an option in general config to have ssl on admin.

That sounds like a slightly different issue to the one I am having. I've never been redirected to an "upgrade in progress" screen - then again I'm running a fresh install of 3.1.2 and I'm not sure that I'd be seeing that.

 

To completely confuse matters I just had another timeout again just now when adding an account, even with my voodoo .htaccess SSL rewrites in place. However after deleting that account I was able to add and delete another 5 accounts with no further timeouts.

Link to comment
Share on other sites

Yeh I've had the tech guys check it out. They are happy everything is fine. This is definitely a post 3.1.2 thing as I used 3.1.1 fine.

 

I tend to only use SSL also, but was just testing to see if it worked without. Like I said it isn't a big thing for me as it does actually add/delete the customer... I just have to restart browser afterwards. Luckily I don't manually add clients that often :)

Link to comment
Share on other sites

Yeh I've had the tech guys check it out. They are happy everything is fine. This is definitely a post 3.1.2 thing as I used 3.1.1 fine.

 

I tend to only use SSL also, but was just testing to see if it worked without. Like I said it isn't a big thing for me as it does actually add/delete the customer... I just have to restart browser afterwards. Luckily I don't manually add clients that often :)

 

maybe there were server changes made by you or your staff between these different versions as well. I am only saying this as i am not having this issue at all with 3.1.2 on multiple servers all using ssl.

Link to comment
Share on other sites

  • WHMCS CEO

And no changes have been made to the add new client process since V2.5.8. All that's run is a simple INSERT query. It does also try and send the welcome email so maybe it's an SMTP issue?

 

Matt

Link to comment
Share on other sites

  • 3 months later...

Hi, sorry to be have dragging this old issue up again. I still have the same old problem on my setup even with WHMCS 3.2.2 installed.

 

When adding a new client manually from the admin area there is a long pause - 300 seconds - so it seems to be some kind of php / mysql timeout.

 

This only happens on the add client feature, and only on the admin side.

 

I don't have the "force https" rewrite rules in place on the admin section any more - in fact I have all .htaccess / rewrite rules disabled at the moment for the WHMCS site.

 

I'm pretty sure that this has nothing to do with the SMTP / email sending routines. The lockup I just experienced was with the "send welcome email" checkbox unchecked. During this timeout / lockup, I checked the current MySQL processes in WHM, these were as follows:

+--------+---------------+-----------+---------------+---------+------+-------+------------------+
| Id     | User          | Host      | db            | Command | Time | State | Info             |
+--------+---------------+-----------+---------------+---------+------+-------+------------------+
| 20     | eximstats     | localhost | eximstats     | Sleep   | 35   |       |                  |
| 105342 | whmcs_admin   | localhost | whmcs_db1     | Sleep   | 278  |       |                  |
| 105343 | whmcs_admin   | localhost | whmcs_db1     | Sleep   | 278  |       |                  |
| 105587 | whmcs_admin   | localhost | whmcs_db1     | Sleep   | 36   |       |                  |
| 105621 | root          | localhost |               | Query   | 0    |       | show processlist |
+--------+---------------+-----------+---------------+---------+------+-------+------------------+

105342 and 105343 would have been related to the creation of the client, 105587 was a new tab I had opened in Firefox to the list clients page - this remained locked up until the initial two MySQL processes had released their lock on the DB after the 300 second timeout.

 

Shortly thereafter I ran another test, this time with "send email" checked, NB: I received the email immediately after clicking "create client" and the browser was still locked up for 300 seconds waiting for a response from the server.

+--------+---------------+-----------+---------------+---------+------+-------+------------------+
| Id     | User          | Host      | db            | Command | Time | State | Info             |
+--------+---------------+-----------+---------------+---------+------+-------+------------------+
| 20     | eximstats     | localhost | eximstats     | Sleep   | 12   |       |                  |
| 107785 | whmcs_admin   | localhost | whmcs_db1     | Sleep   | 160  |       |                  |
| 107787 | whmcs_admin   | localhost | whmcs_db1     | Sleep   | 160  |       |                  |
| 107975 | root          | localhost |               | Query   | 0    |       | show processlist |
+--------+---------------+-----------+---------------+---------+------+-------+------------------+

Note two sleeping processes again - both sequential (or close) process IDs and both with the same time sleeping. At 300 seconds the processes are released and then my browser goes to the client profile screen.

 

Note that this lock up relates only to the current browser / session. I am able to access the admin system with no problems using another browser on another machine during the period where my original browser session is locked up. I am able to access and modify the newly created client in the other browser session with no problems.

 

I expect that these issues I am seeing are related to my particular hosting environment - and I know that they are also somehow related to this specific function in WHMCS - I don't get any such timeout issues with any of the other functions in WHMCS, or on any of the other 40 or so sites hosted on this particular server, all running different CMS / forum / image gallery type systems.

 

Surely there has to be someone else out there who can reproduce this issue... or has some ideas as to what might be going on. It's a fairly minor issue, but incredibly frustrating for it's size.

 

:evil:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated