Page 1 of 3 123 Last
  • Jump to page:
    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2006
    Posts
    27
    Rep Power
    0

    Unhappy Firebird & Coldfusion timeout error


    Hi

    I have just installed Firebird 2.1 and Coldfusion 7. I have configured a few sites to work with both. I am able to view the sites fine, however, after I login and try to make changes, the site takes forever to update and finally there is a CFQuery timeout error. I know for a fact that this is not a problem with CF since it does not have the same problem with MySQL.

    I did not have this problem either with the previous version of FireBird.
    This is my first time with FireBird 2.1 and I just wondering if I need to make other configurations.

    Any help would be greatly appreciated.

    Thanks
  2. #2
  3. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2006
    Posts
    27
    Rep Power
    0
    This would be an example of the query


    <cffunction name="ResetPassword"
    hint="Generates a random string, resets the specified the user's password with it, and returns the string."
    access="public"
    output="No"
    returnType="string"
    >
    <cfargument name="strUUID"
    type="string"
    required="Yes"
    hint="UUID"
    />
    <cfset This.ReturnValue=""/>

    <!---+ read in arguments +--->
    <cfset This.strUUID=Arguments.strUUID/>

    <!---+ generate random password +--->
    <cfset This.ReturnValue=LCase(Right(CreateUUID(),8))/><!---+ take last 8 chacters of a newly generated uuid +--->

    <cflock name="ResetPassword" type="EXCLUSIVE" timeout="10">
    <cftransaction>
    <!---+ store hashed password +--->
    <cfquery name="This.QResetPassword" datasource="#This.DSN#">
    UPDATE TBLACCOUNTS
    SET PWHASH='#Hash(This.ReturnValue)#'
    WHERE UUID='#This.strUUID#'
    ;
    </cfquery>
    </cftransaction>
    </cflock>

    <cfreturn This.ReturnValue/>
    </cffunction>



    Originally Posted by pabloj
    The description doesn't help much?
    Can you show us the troublesome query? Can you set your app in debug mode?
  6. #4
  7. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
    You should check if some other transaction is blocking yours, as you are trying to set an exclusive lock with a timeout of 10.
    Use fb_lock_print.exe for that.
    On Firebird 2.1 you can also look at the mon$tables to see if you can get to the blocking statement.
    BTW why do you need an exclusive lock? See caveats (I know it's for 1.5 but holds generally true) I suspect cf locks the entire table.
    BTW II: how does cf connect to Firebird? ODBC or a specific driver?
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2006
    Posts
    27
    Rep Power
    0
    Hi

    Thanks for your prompt response. I thought it would not be such a big problem. I am able to read from the database very well using similar but read queries. Only writing is a problem. Never had this problem before. Anyway, CF connects to firebird via firebird jdbc driver. I use a firebirdsql.jar file. The connection is fine, so is the site. The entire site reads from the db, just writing is a problem


    Originally Posted by pabloj
    You should check if some other transaction is blocking yours, as you are trying to set an exclusive lock with a timeout of 10.
    Use fb_lock_print.exe for that.
    On Firebird 2.1 you can also look at the mon$tables to see if you can get to the blocking statement.
    BTW why do you need an exclusive lock? See caveats (I know it's for 1.5 but holds generally true) I suspect cf locks the entire table.
    BTW II: how does cf connect to Firebird? ODBC or a specific driver?
  10. #6
  11. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
    That's fine as lock affects writes, not reads.
    I'd see if the lock affects other coldfusion threads or the database as I said above.
    I'd also remove the explicit lock in cf and let the database manage everything.
    Can you test this and what I described above?
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2006
    Posts
    27
    Rep Power
    0
    Thanks alot, I will try this


    Originally Posted by pabloj
    That's fine as lock affects writes, not reads.
    I'd see if the lock affects other coldfusion threads or the database as I said above.
    I'd also remove the explicit lock in cf and let the database manage everything.
    Can you test this and what I described above?
  14. #8
  15. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2006
    Posts
    27
    Rep Power
    0
    I have just removed the lock. It still times out and the same error shows up. Is there a specific place where I can see this error in Firebird? I have checked the firebird.log for firebird it does not show much.

    Originally Posted by pabloj
    That's fine as lock affects writes, not reads.
    I'd see if the lock affects other coldfusion threads or the database as I said above.
    I'd also remove the explicit lock in cf and let the database manage everything.
    Can you test this and what I described above?
  18. #10
  19. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
  20. #11
  21. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2006
    Posts
    27
    Rep Power
    0
    Actually, that is what I am trying to do.
    I have sites with Mysql db on the same machine connected to CF and they update fine with exactly the same queries.

    Is there a software for firebird that I can download for debugging?

    Originally Posted by pabloj
    Can you run this query from another client connected to the same system?
    Can you check the CF log to confirm it's not a CF problem?
  22. #12
  23. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
    If you want a GUI client tool look at Flamerobin
    Also note that if you are on MySQL and using MyISAM tables you won't have transactions or locks because those are not supported
  24. #13
  25. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2006
    Posts
    27
    Rep Power
    0
    Hi

    Thanks for your help. Much appreciated. I will try Flamerobin or look further into Firebird 2.1 I was using Firebird 2.0 for over a year now with exactly the same sites and queries and they have never had problems. I just recently migrated to FB 2.1. I might need to go back to 2.0 after all, until I have everything tested out thoroughly with CF.

    Im not sure what the big difference is with 2.0 and 2.1.

    Thanks.


    Originally Posted by pabloj
    If you want a GUI client tool look at Flamerobin
    Also note that if you are on MySQL and using MyISAM tables you won't have transactions or locks because those are not supported
  26. #14
  27. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
  28. #15
  29. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2006
    Posts
    27
    Rep Power
    0
    Actually, I have been using the same drivers for every new version. These drivers are not exactly easy to find online.
    Please view this post to get an idea of how the two are installed and configured:
    Getting Started with Coldfusion and Firebird

    What do you mean by 'how are discs running'?


    Originally Posted by pabloj
    When switching to Fb2.1 did you update the jdbc driver too?
    How are your disks running?
    Last edited by pabloj; July 28th, 2008 at 05:24 AM. Reason: direct link added
Page 1 of 3 123 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo