Previous Next

Thread: Problem with webservice on PHP with IIS 6

Last post 05-14-2008 9:26 AM by brashquido. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 05-14-2008, 5:44 AM

    • obgc
    • Not Ranked
    • Joined on 04-18-2008, 1:42 PM
    • Posts 4
    • obgc

    Problem with webservice on PHP with IIS 6

    Few weeks ago I wrote a post about a problem we had. Unfortunately I was not able to give all the details because I was not personally involved in the implementation. (previous post: http://forums.iis.net/p/1148933/1867552.aspx)

    Today let me give you more detailed description of the problem, which unfortunately still exists.

    If You're able to help me I would appreciate it very much.

     

    We have created WebService based on the IIS(6.0) server and PHP (v 5.2.1) technologies. The Service makes 6 methods available, of which 3 enable data to be read and 3 enable data to be saved to/from database.

     
    Individual methods that we tested operated correctly.

    Up to 100 external users use the available WebService in the production system. They use a third party application for calls - thus it is difficult to debug the error on the client's part.

     
    Error 500 "internal server error" appears in IIS server logs.

     
    It appears irregularly when calling one of 3 methods allowing data to be saved to database. The frequency of occurrence differs for each method, sometimes it is 10% of errors among the overall number of calls of a given method, in other cases - 60%.

    The support of requests for individual methods does not, however, differ considerably.

     

    We've checked if database table lock could cause this errors but it is not that. In case table is locked, we get a separate error code, which is handled by us.

     

    Neither have we noticed any relation between the number of errors and the address (user) from which the WebService has been called.

     

    The number of WebService calls is about 20 odd within a minute, whereby requests occur in groups and sometimes there may even be 10 calls within one second. The controversial error occurs, however, both when requests appear occasionally and when many requests appear simultaneously.

     

    The system does not generate any exceptions when the error occurs. Also within the definition of each of the 6 methods (Function1 - Function6), all operations are included in exception blocks.
    Here, we did not manage to capture any, either.

     

    Data processing within each of the methods starts from saving call parameters to database.  In the case of the error in question, no records appear in the database.

     

    We used the values of call parameters for individual WebService saved in the „ws_log" file in an attempt to reproduce the error. We did not succeed during tests - the same parameters do not cause any problems during manual call.

     

    What can be the cause of the aforementioned error?

    Is there a chance that IIS on the beginning of processing the request generates an error and does not continue?

    Are there ways to debug the operation of the IIS at the beginning of procesing?

    What performance settings on IIS can be checked/monitored concerning above problems?

    How to do that?

    Do You have any ideas what other areas should be checked/considered?


     

     

    Thanks

    Greg 

  • 05-14-2008, 9:02 AM In reply to

    • obgc
    • Not Ranked
    • Joined on 04-18-2008, 1:42 PM
    • Posts 4
    • obgc

    Re: Problem with webservice on PHP with IIS 6

    I can see that my topic has been moved to another forum. If this is really a PHP related issue then it's fine.

    Of of the questions is also - if this is something to do with IIS itself?

    I'm looking forward to getting some answers :)

    Best regards
    Greg
     

  • 05-14-2008, 9:26 AM In reply to

    • brashquido
    • Top 25 Contributor
    • Joined on 05-21-2006, 8:31 PM
    • Australia
    • Posts 153
    • brashquido

    Re: Problem with webservice on PHP with IIS 6

    So if I understand correctly you have a PHP application running on IIS which is giving you random 500 errors?

    Some questions for you;

    How is PHP configured? I.e. CGI, ISAPI, FastCGI and is threadsafe or non threadsafe build.

    What PHP extensions are enabled?

    What logging do you have enabled in php.ini?

    Have you scanned your IIS log files for any 500 errors to see if there is anything common, such as URL, client IP, operating system, browser make/version, etc?  

     

    ----------------
    Dominic Ryan
    Microsoft IIS MVP
    www.iis-aid.com
    My IIS articles
    My PHP articles
    My How-to guides
Page 1 of 1 (3 items)
Page view counter