Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[SDK] [ODB] Memory leak? Frozen DB Calls?

 [1/3] from: ammon:addept:ws at: 27-Apr-2004 15:30


I have an SQL Server... Quad P4 2Ghz 2GB RAM I have two servers that run 4-6 programs that make calls to the SQL Server every few minutes... 2.4 GHz P4 512 MB DDR RAM I have a little reblet that makes several DB Calls (50-100) every hour on the hour. Some of these calls get kinda large (~50k records each) If I run the reblet every now and then closing it after it runs its process then everything runs smoothly but if I leave it running on one of the servers then a particular one of the DB programs freeze on that server. If I leave it running on another machine then the program freezes on both servers. I open a fresh DB connection and close it when it is done so it isn't leaving a connection open but I don't UNSET any variables. Any ideas? Thanks!! ~~Ammon ;~>

 [2/3] from: greggirwin::mindspring::com at: 27-Apr-2004 16:06


Hi Ammon, AJ> I have a little reblet that makes several DB Calls (50-100) every hour on AJ> the hour. Some of these calls get kinda large (~50k records each) If I run AJ> the reblet every now and then closing it after it runs its process then AJ> everything runs smoothly but if I leave it running on one of the servers AJ> then a particular one of the DB programs freeze on that server. If I leave AJ> it running on another machine then the program freezes on both servers. I AJ> open a fresh DB connection and close it when it is done so it isn't leaving AJ> a connection open but I don't UNSET any variables. Any ideas? Without trying tests against different DBs (you're using ODBC I'm guessing), the first thing that comes to mind (after adding logging to see exactly what's going on when it freezes and sending that info to RT), is to run the DB access scripts from a controller process, or just cron/AT them; let them run and go away. Could locking in the DB cause you to hang? Not sure exactly what your scripts are doing, so it's hard to say if it's a REBOL bug or not. -- Gregg

 [3/3] from: ammon:addept:ws at: 27-Apr-2004 16:56


> Hi Ammon, > > AJ> I have a little reblet that makes several DB Calls (50-100) every hour
on
> AJ> the hour. Some of these calls get kinda large (~50k records each) If
I run
> AJ> the reblet every now and then closing it after it runs its process
then
> AJ> everything runs smoothly but if I leave it running on one of the
servers
> AJ> then a particular one of the DB programs freeze on that server. If I
leave
> AJ> it running on another machine then the program freezes on both
servers. I
> AJ> open a fresh DB connection and close it when it is done so it isn't
leaving
> AJ> a connection open but I don't UNSET any variables. Any ideas? > > Without trying tests against different DBs (you're using ODBC I'm > guessing), the first thing that comes to mind (after adding logging to > see exactly what's going on when it freezes and sending that info to > RT), is to run the DB access scripts from a controller process, or > just cron/AT them; let them run and go away.
I am using ODBC to access an MS SQL Server. The other programs that access the DB are the ones that freeze. They are written in VB so I expect some problems but somehow my script is interacting badly with the program. (the only thing they have in common is that they access the same DB)
> Could locking in the DB cause you to hang? Not sure exactly what > your scripts are doing, so it's hard to say if it's a REBOL bug or > not.
I expect that it is an SQL Process that is locking but why would it lock on the VB program instead of my script? It runs fine if I don't leave my script running so I am a little confused. The largest table I am accessing is under 1 million records so as far as I can tell it shouldn't be locking... Wait a minute... I just recalled that I had a similar problem with this program several months back... Corrupt database... I restarted the DB from scratch when that happened. Perhaps this program has simply corrupted the DB again and my script is just triggering the effect? Thanks again!! ~~Ammon ;~>