Sporadic "Toolkit request failed.." errors after OS upgrade

Discussion in 'PHP Toolkit' started by Sheldon Foster, Nov 10, 2015.

  1. Sheldon Foster

    Sheldon Foster New Member

    Over this past weekend we upgraded our OS to i7.2. Since then we get sporadic errors when calling rpg programs. They don't consistently occur, but they do seem more frequent with more users connected (but that may just be a coincidence). The error is: "Toolkit request failed. Possible reason: a CCSID not matching that of system, or updated PTFs may be required. Database code (if any): HY021. Message: Error occurred in SQL Call Level Interface"

    Has anyone seen or experienced this error under this scenario?

    For reference:
    Zend Server Community Edition 8.0.2
    PHP 5.6.5
    IBMi Toolkit 1.5.0
    XML Toolkit (XMLSERVICE) 1.9.1
     
  2. Alan

    Alan Administrator Staff Member

    Sheldon, was it a Zend Server upgrade at the same time, or only the OS? Looks related to the DB2 connection dropping somehow.
     
  3. Sheldon Foster

    Sheldon Foster New Member

    We upgraded the OS to 7.2 over the weekend, and upgraded to Zend Server 8.5 yesterday, hoping it would help. The text of the error changed slightly but it looks to be essentially the same.
     
  4. Alan

    Alan Administrator Staff Member

    Are you using a persistent database connection underneath the toolkit?
     
  5. Alan

    Alan Administrator Staff Member

    and do you specify i5_libl, i5_lib, neither or both?
     
  6. Sheldon Foster

    Sheldon Foster New Member

    This is how we are establishing our db2 connection
    $options = array (
    'i5_naming' => DB2_I5_NAMING_ON,
    'autocommit' => DB2_AUTOCOMMIT_ON
    );
    $GLOBALS['dbconnection'] = db2_connect("*LOCAL", $this->userLogin, $this->userPassword, $options);

    We use this non-persistent connection throughout the session (hence the $GLOBALS variable) for any subsequent sql queries or rpg calls.
    All our rpg calls are done stateless. We haven't specified any library list option - we've been letting that happen by default.
     
  7. Alan

    Alan Administrator Staff Member

    Thank you, Sheldon. This looks fine.
    Do you then you pass the dbconnection value into getInstance() of the toolkit?
     
  8. Sheldon Foster

    Sheldon Foster New Member

    Yes, we do.
     
  9. Alan

    Alan Administrator Staff Member

    Try a persistent connection (db2_pconnect). It will reduce the system "stress" of all the opens/closes. We've seen this solution work. Just be ready to see more QSQSRVR jobs because each user will retain a job or two.
    Try and let us know.
     
    Last edited: Nov 13, 2015
  10. Alan

    Alan Administrator Staff Member

    Follow-up was that the persistent connection resolved the issue.
     
  11. Sheldon Foster

    Sheldon Foster New Member

    Just to clarify, by the time we tested that solution we had so few users using the application that we did not have the same load - keep that in mind. Also, in our case we have reservations about using the persistent connection so for us, it isn't a viable solution, per se.
     
  12. Alan

    Alan Administrator Staff Member

    Understood that you may have to test more and there may be aspects of persistence that you don't like. I gave the quick version of the answer for the benefit of others. If I'm proved wrong then we'll update the entry.
     
  13. Sheldon Foster

    Sheldon Foster New Member

    Understood - just didn't want the thread to "stop" just in case someone else comes up with something
     
  14. Alan

    Alan Administrator Staff Member

    I also understand that although persistence may stop the symptoms, there was an original root cause that was triggered by all the open/close activity with the connection before you used persistence.
     
  15. Alan

    Alan Administrator Staff Member

    Thanks, Sheldon.
     
  16. Sheldon Foster

    Sheldon Foster New Member

    Alan - actually, I thank you. This has been very frustrating and I certainly don't mean for any of that to be directed towards you. We are concentrating on some other pressing needs for the moment, but the first chance we get we are going to try pconnect again and see if we can figure out if we're doing something wrong there.
     
  17. Alan

    Alan Administrator Staff Member

  18. Kerry Shupert

    Kerry Shupert New Member

    We upgraded to V7R2 last weekend and immediately started getting these sporadic failures: Toolkit request failed. Possible reason: a CCSID not matching that of system, or updated PTFs may be required. Database code (if any): HY021. Message: Error occurred in SQL Call Level Interface. Upon further investigation, I found that I was getting a connection to the XMLToolkit. I can even see the libraries change within the Job log of the XML Toolkit. I found that when the script tried to call an RPG program is when the error message occurs.

    I found this thread and called IBM. I have a PMR open with IBM. They authorized my machine the ability to put on the test PTF SI60350 and I have it applied. However the failure is still occurring. Interestingly, it only fails sporadically in one specific script, but I am using the toolkit in the exact same way in other scripts, just calling different RPG programs.

    Zend Server Community Edition 8.0.2
    PHP 5.6.5
    IBMi Toolkit 1.5.0
    XML Toolkit (XMLSERVICE) 1.9.1
     
    Last edited: Jun 23, 2016
  19. Kerry Shupert

    Kerry Shupert New Member

    Looks like the PTF did work. Zend Server needed to be restarted after the PTF was applied. I wanted to wait a couple days to verify the message hadn't occurred again due to its sporadic nature before posting here again.

    Thanks.
     
  20. Alan

    Alan Administrator Staff Member

    Oh, great! Thanks for letting us know, Kerry. That information will help future PHP travelers!
     

Share This Page