Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003
    Posts
    10

    Unanswered: Mysterious Cursor Error

    Hi there.

    We are running Sybase Adaptive Server 11.9.2.4 with JRun 3.1 (a j2ee application server).

    About once a day JRun emits the following error:

    "java.sql.SQLException: [JRun][Sybase JDBC Driver][Sybase]The cursor '(Unknown name)' can not be used as it could not be found. It is
    possible that either it was not declared or it is not available in the current context."

    Once this error has occured once, it occurs more frequenly, although *some* database access is still possible.

    According to the Sybase manual, the error explanation is:

    "Adaptive Server could not perform the requested action. Check your command for missing or incorrect database objects, variable names, and/or input data."

    This is useless to us. We are pretty sure that our SQL-calls are correct as they are working until the error suddenly occurs.

    We have discovered that time-consuming (i.e. big) SQL-calls that causes a timeout actually leads to JRun emitting the error above. However, we cannot simply increase the timeout as that causes clients to wait for too long (because of locks). Our timeout is currently set to 60 seconds.

    We have about a zillion SQL-calls distributed in all our code so finding the time-consuming SQL-calls is quite difficult...

    What to do?

    We are considering logging all SQL-calls, with a timestamp and a time-to-complete (or timeout), but we want to do this at the Sybase side rather than at dozens of clients.

    Is such SQL-call logging possible? Basically, we want something like this:

    <sqlcall>, <call-date>, <completion-time>

    e.g.

    "select * from MyTable", 2003-09-03 12:28:04, 190 milliseconds

    Any suggestions and ideas are very welcome.

    Thanks,

    Morten

  2. #2
    Join Date
    Apr 2003
    Posts
    10

    Possible causes

    For readers with similar problems, it seems that the problem has gone away, for the time being at least.

    We did two things. First of all, we discovered that our website was the target of several web crawlers. We have blocked these and setup web crawler detection systems.

    Second, we identified resource-intensive SQL statements, some of which took more than 80 seconds to complete. We then divided these SQL statements into smaller invocations.

    Morten

Posting Permissions

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