Results 1 to 7 of 7

Thread: SugarCRM hangs/blocks PHP applications

  1. #1
    andreasr is offline Sugar Community Member
    Join Date
    Jul 2006
    Posts
    16

    Default SugarCRM hangs/blocks PHP applications

    Hi,

    Shortly after upgrading to Sugar 4.5.1, our production installation has misbehaved. After some time of traffic, SugarCRM will suddenly hang, giving no HTTP reply at all (checked via telnet, probably due to output buffering). Seemingly nothing of significance appears in the log, possibly because the log isn't flushed often enough.

    This hanging behaviour also propagates to other PHP applications on the same server, notably applications that connects to the database. Apache still serves static files as normal. Only PHP applications are affected.

    I need help further diagnosing this problem, for example forcing log flush. Any ideas and tips will be greatly appreciated.

    O/S: Windows 2000
    Sugar version: 4.5.1b
    Webserver: Apache 2.0.59
    PHP: 5.2.3 (5.1.x also affected)
    MySQL: 4.1.22-community-nt
    Last edited by andreasr; 2007-06-08 at 11:07 AM.

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: SugarCRM hangs/blocks PHP applications

    Have you looked into memory consumption? Perhaps some script is causing PHP to consume more memory than what you'd expect. Also, take a look at the memory limit setting in your PHP.INI
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  3. #3
    andreasr is offline Sugar Community Member
    Join Date
    Jul 2006
    Posts
    16

    Default Re: SugarCRM hangs/blocks PHP applications

    This problem is still persistent. Any ideas?

    Angel: it's not a problem with memory consumption.

  4. #4
    andreasr is offline Sugar Community Member
    Join Date
    Jul 2006
    Posts
    16

    Default Re: SugarCRM hangs/blocks PHP applications

    Problem is still present with 4.5.1d patch installed. I have also confirmed this behavior on a different computer also running Windows 2000. I'm trying to provoke this behavior on a Windows XP workstation.

  5. #5
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: SugarCRM hangs/blocks PHP applications

    I am not sure whats going on here but I am sure it's not a sugar thing. Even if Sugar locks up PHP should eventually time out and give an error message, output buffering or not. If you never receive that error.

    Do you have your php.ini logging being sent to the screen or a log file? If a log file is there anything there? How about the apache logs or mysql logs?

    You say in another post that the behavior was seen on another 2000 server. Was this a completely separate install sharing nothing with the first server? I don't have alot of Windows server troubleshooting experience but from my Linux experience I would start with all the logs and find what the common thread is that ties these events together. Maybe a corrupt database table or something like that but from your description I would guess that the problem stems from the database not PHP as PHP is loaded dynamically each time a script is run. If one locked up the next would know nothing of that lockup.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  6. #6
    andreasr is offline Sugar Community Member
    Join Date
    Jul 2006
    Posts
    16

    Default Re: SugarCRM hangs/blocks PHP applications

    Quote Originally Posted by kbrill
    I am not sure whats going on here but I am sure it's not a sugar thing. Even if Sugar locks up PHP should eventually time out and give an error message, output buffering or not. If you never receive that error.
    That's correct - however, PHP never times out It keeps hanging for hours and hours. A few days ago, SugarCRM hang overnight, and while being subject to a DoS attack, Apache quickly ran out of available threads because PHP blocked them all! This is very strange behavior, and it's very hard to debug because the hangs are so random.


    Quote Originally Posted by kbrill
    Do you have your php.ini logging being sent to the screen or a log file? If a log file is there anything there? How about the apache logs or mysql logs?
    PHP logs to apache's error log. Neither the Apache error log nor SugarCRM log show anything of significance (as far as I can tell). The sugarcrm log indicates that sugarcrm is trying to perform a database query (select * from currencies or something along those lines), but that's the case for all PHP applications -- they hang when they try to query the database. SugarCRM however is the *only* application provoking the initial hanging.

    I have not checked any MySQL logs, however I will absolutely do so the next time hanging occurs.

    Note, however, that applications running on a non-hanging machine are still perfectly capable of connecting to and querying the same database as the hanging applications are trying to use!

    Quote Originally Posted by kbrill
    You say in another post that the behavior was seen on another 2000 server. Was this a completely separate install sharing nothing with the first server? I don't have alot of Windows server troubleshooting experience but from my Linux experience I would start with all the logs and find what the common thread is that ties these events together. Maybe a corrupt database table or something like that but from your description I would guess that the problem stems from the database not PHP as PHP is loaded dynamically each time a script is run. If one locked up the next would know nothing of that lockup.
    I moved the SugarCRM installation from one computer to the other. It still connected to the same common database server. Other than that, all I know is that they were running Windows 2000 with some differences in installed updates.

    You are suggesting that there might be something wrong with the database. I doubt this because the database works fine for other non-hanging servers.

    As for the lockups and how PHP scripts are run -- I don't know. To me, it seems that PHP is deadlocking and unable to time out. I have examined PHP, Apache, and SugarCRM logs countless times now, but I can never find any clues,

    Personally, I am suspecting some kind of weird deadlock issue with Win2k/PHP. I don't think Apache nor MySQL is at fault. And SugarCRM is probably just trigging the deadlock, not causing it.

  7. #7
    andreasr is offline Sugar Community Member
    Join Date
    Jul 2006
    Posts
    16

    Default Re: SugarCRM hangs/blocks PHP applications

    Could any of these be mildly related?

    http://bugs.php.net/bug.php?id=29449
    http://bugs.php.net/bug.php?id=22526

    Both are very old I guess, but might give some hints if there's a deadlock issue.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Merge Contacts show sql error
    By hheckner in forum General Discussion
    Replies: 5
    Last Post: 2006-10-04, 01:57 PM
  2. PHP Warnings after install add-in Module
    By kgeving in forum Help
    Replies: 1
    Last Post: 2006-08-08, 05:54 PM
  3. Replies: 16
    Last Post: 2006-07-29, 07:28 PM
  4. Errors after upgrade
    By mturany in forum Help
    Replies: 0
    Last Post: 2006-04-24, 04:40 AM
  5. ERROR in 4.01
    By rateck in forum Help
    Replies: 3
    Last Post: 2006-02-02, 10:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •