roxen.lists.roxen.general

Subject Author Date
RE: database timeouts? Graeme Davis <Graeme[dot]Davis[at]VerizonBusiness[dot]c> 17-02-2006
It hangs the whole server and I have a script that will kill -USR1 backtrace
& restart Roxen when it's hung.  Looking at some of the debug logs, it seems
like most threads are hung on destroy() calls.   But it's hung on calls to
my local MySQL dbs which I know are up, so something is causing everything
to hang.... Could it be the create() call that locks stuff?

Background: "PERPT" is the shoddy Oracle DB that goes down a lot.

15:51:00  : __builtin.mutex: lock()
14m38.7s  : base_server/roxenloader.pike:1413: SQL( "mysql;//u:<p[at]h>/etms:-"
)->destroy()
          : base_server/emit_object.pike:61: get_row()

          : ### Thread 11:
          : __builtin.mutex: lock()
          : base_server/roxenloader.pike:1413: SQL( "local:rw" )->destroy()
          : base_server/roxen.pike:5038:
roxen->compile_security_pattern("",RoxenModule(CCARE/email#0))

          : ### Thread 14:
          : pike/lib/pike/modules/Sql.pmod/oracle.pike:
create("PERPT","","u","p")
          : pike/lib/pike/modules/Sql.pmod/Sql.pike:223:
create("PERPT",0,"u","p",0)
15:51:00  : etc/modules/DBManager.pmod:243:
sql_cache_get("oracle://u:<p[at]PERPT>")

Let me know if you would like to see full backtraces.. Maybe that would
help... The funny thing is that I still get these type errors:

RXML run error: Couldn't connect to SQL server: Oracle:code=-1:Error while
trying to retrieve text for error ORA-12535 

Hope this provides more info on potential solutions =)

Thanks a lot,

Graeme

-----Original Message-----
From: Bill Welliver [mailto:<hww3[at]riverweb.com>] 
Sent: Friday, February 17, 2006 10:30 AM
To: Graeme Davis
Cc: <roxen[at]roxen.com>
Subject: Re: database timeouts?

I guess the real question is what you'd like to have happen... does the fact
that the databases are unavilable affect the whole site (rendering it
useless anyhow), or is it just a subset?

It's strange that the behavior of those database connections is to hang when
the database goes away (is that actually the case?) My experience with
oracle and mysql don't seem to suggest that behavior.

I'd imagine that perhaps some sort of timeout on queries would be handy, but
it might add undesirable overhead.

Bill

On Fri, 17 Feb 2006, Graeme Davis wrote:

> I've been having a problem with Roxen and some external databases 
> (sybase and oracle) that I talk to  (that aren't under my control).  
> When an external db goes down, roxen will fill up all threads and 
> hang.. I was wondering if anyone else has this problem?
>
> Pike version:      Pike v7.2 release 543
> Product version:   Roxen CMS 3.4.109-release4
> Operating system:  SunOS 5.8 (sun4u)
> 10 threads
>
> I was thinking I might have to write some external scripts to "ping" 
> the db server port and somehow turn off access to that database in 
> roxen, but I shouldn't have to do that.
>
> Any ideas?
>
> Thanks,
>
> Graeme
>