Re: [AOLSERVER] postgres_driver: cannot connect to localhost:80:test

2003-05-30 Thread Tom Brown
Port 5432 worked. I am now able to insert rows in the target table. I can't
seem to find the documentation I need for these problems (the second) so I
am relieved that list members are responsive and accurate.

The offending line from the server configuration file was originally
ns_param datasource  HOSTNAME:PORT:database_name. It didn't work either.
Was the syntax wrong? Or the variables not defined? How do you know to use
port 5432?

Tom

At 11:44 PM 5/28/03 -0400, you wrote:
On Wednesday 28 May 2003 22:46, Tom Brown wrote:
 Getting a postgres driver error. Can't connect. Appears not able to find
 server and db. Tail of aolserver log below.
2 [-conn0-] Error: Ns_PgOpenDb(postgres_driver):  Could not connect to
 localhost:80:test:  could not connect to server: No such file or directory

Use localhost:5432:test, not localhost:80:test for your datasource.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/



--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] postgres_driver: cannot connect to localhost:80:test

2003-05-30 Thread Lamar Owen
On Thursday 29 May 2003 10:06, Tom Brown wrote:
 The offending line from the server configuration file was originally
 ns_param datasource  HOSTNAME:PORT:database_name. It didn't work either.
 Was the syntax wrong? Or the variables not defined? How do you know to use
 port 5432?

The PORT in the datasource parameter is the port number postmaster is
listening to.  In the default case that's 5432.

The variables weren't defined, since you could have a large web site pulling
data from multiple database servers, on multiple postmasters (ports), and
multiple database names.

That _used_ to be in the documentation -- but it's been a long time since I've
looked (a long time in this instance means five years or more, since I last
needed that information in 1997 for AOLserver 2.2.1).

I can, however, put that information (along with much needed general updates)
in the README file in the nspostgres distribution.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] Instability with [ns_server all] under moderate load?

2003-05-30 Thread Jim Davidson

In a message dated 5/29/2003 2:28:56 AM Eastern Daylight Time, [EMAIL PROTECTED] writes:
We have been trying to debug occasional (1-4 times/day) unexplained servercrashes under moderate load. Our most recent testing points fairly stronglyto the command "[ns_server all]" which occurs in a trace filter we run forsystem monitoring purposes. We are currently testing an updated version ofthe filter which omits this command, but I would still be interested to knowif anyone has encountered instability with the use of ns_server in theirenvironment. The relevant snippet of code looks something like this:



Hi,

I don't believe "ns_server all" is thread safe and it would be expensive to make it so. It's designed for occasional use in a debugging context, not as part of regular connection processing. The docs should probably be updated to make this clear.

-Jim



--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/



Re: [AOLSERVER] Instability with [ns_server all] under moderate l oad?

2003-05-30 Thread Seena Kasmai



Is this also true for all the other
ns_server commands like [ns_server connections] or [ns_server active] ?


Because we are using these
extensivelyfor monitoring and performance analysis. It seems the only time
we've had crashes due to use of [ns_server all] is when there were lots of
waiting threads (in the backlog) in a heavy load situation. I agree that
"ns_server all" may not be very stable but it'll be useful to know if all the
there ns_server parameters may not be stable either.

Thanks,
-Seena

  -Original Message-From: Jim Davidson
  [mailto:[EMAIL PROTECTED]Sent: Thursday, May 29, 2003 11:47
  AMTo: [EMAIL PROTECTED]Subject: Re: [AOLSERVER]
  Instability with [ns_server all] under moderate
  load?In a message dated
  5/29/2003 2:28:56 AM Eastern Daylight Time, [EMAIL PROTECTED]
  writes:
  We have been trying to debug occasional (1-4 times/day) unexplained
servercrashes under moderate load. Our most recent testing points
fairly stronglyto the command "[ns_server all]" which occurs in a trace
filter we run forsystem monitoring purposes. We are currently
testing an updated version ofthe filter which omits this command, but I
would still be interested to knowif anyone has encountered instability
with the use of ns_server in theirenvironment. The relevant
snippet of code looks something like this:
  
  
  
  Hi,
  
  I don't believe "ns_server all" is thread safe and it would be expensive
  to make it so. It's designed for occasional use in a debugging context,
  not as part of regular connection processing. The docs should probably
  be updated to make this clear.
  
  -Jim
  
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/



--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/



Re: [AOLSERVER] Instability with [ns_server all] under moderate l oad?

2003-05-30 Thread Jim Davidson

In a message dated 5/29/2003 1:53:00 PM Eastern Daylight Time, [EMAIL PROTECTED] writes:

Is this also true for all the other ns_server commands like [ns_server connections] or [ns_server active] ? 

Because we are using these extensivelyfor monitoring and performance analysis. It seems the only time we've had crashes due to use of [ns_server all] is when there were lots of waiting threads (in the backlog) in a heavy load situation. I agree that "ns_server all" may not be very stable but it'll be useful to know if all the there ns_server parameters may not be stable either.
It appears "active", "all", and "queued" are all unsafe. "Connections" is safe in that it shouldn't crash the server but it's not necessary correct in that it does a dirty read. Check the code in nsd/queue.c for details, in particular the AppendConn functions which has the following comments:

 /* * An annoying race condition can be lethal here. */ if ( connPtr != NULL ) {
...
 /* * Carefully copy the bytes to avoid chasing a pointer * which may be changing in the connection thread. This * is not entirely safe but acceptible for a seldom-used * admin command. */


The problem is either the connPtr or some of the data buried in the conn can be changing in the running connection thread. I wouldn't suggest thisbe fixed because it could complicate the code and introduce a performance problem.

Perhaps you could describe what logging you're trying to do and aspecial module could be built to do the right thing safely with an acceptableperformance penalty (if any).

-Jim



--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/



Re: [AOLSERVER] postgres driver problem

2003-05-30 Thread Jamie Rasmussen
I've also seen this with OpenACS/PostgreSQL/Win32, and I think Jonathan
Ellis was reporting the same error in his message to this list on 15 May.
I'm going to try and reproduce the error with the next beta (coming out
very soon).  Assuming it is still there, I'll start a bug on SourceForge
so that it doesn't get lost in the mailing list traffic.  (Or feel free
to report it first, I'm swamped!)
Thanks,
Jamie

Mohan Pakkurti wrote:
hi!

I am trying to use the postgres driver with aolserver 4.0
and get the following error. Does this make any sense? Is
this some know bug? :) The same code works ok with aolserver3.
Using aolserver4beta6 and nspostgres-4.0beta1 on Solaris.

Thanks!

/Mohan

The error message in the log file:

invalid database id:  nsdb0
while executing
ns_pg_bind 0or1row nsdb0 {
select count(*) from pg_class
where relname = lower(:table_name) and
relname !~ '^pg_' and relkind = 'r'
...
(uplevel body line 1)
invoked from within
uplevel $ulevel [list ns_pg_bind $type $db $sql
invoked from within
db_exec 0or1row $db $full_name $sql
invoked from within
set selection [db_exec 0or1row $db $full_name $sql]
(uplevel body line 2)
invoked from within
uplevel 1 $code_block 
invoked from within
db_with_handle db {
set selection [db_exec 0or1row $db $full_name $sql]
}
(procedure db_string line 7)
invoked from within
db_string table_count {
select count(*) from pg_class
where relname = lower(:table_name) and
relname !~ '^pg_' and relkind = 'r'
}
(procedure db_table_exists line 2)
invoked from within
db_table_exists $table_name
(procedure install_good_data_model_p line 3)
invoked from within
install_good_data_model_p
(file /web/foobar/packages/acs-bootstrap-installer/installer/create-
administrator.tcl line 1)
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] postgres_driver: cannot connect to localhost:80:test

2003-05-30 Thread Tom Brown
I love it! Conversing with the maintainers. Yes, more info in the README
please. I am sure to physically separate the web server from the database
server soon. Free Geek Michiana intends to host sites and provide web
application services for nonprofits. Info on bullet proof virtual hosting
would be helpful.


http://www.freegeekmichiana.org/

Tom

At 11:08 AM 5/29/03 -0400, you wrote:
On Thursday 29 May 2003 10:06, Tom Brown wrote:
 The offending line from the server configuration file was originally
 ns_param datasource  HOSTNAME:PORT:database_name. It didn't work either.
 Was the syntax wrong? Or the variables not defined? How do you know to use
 port 5432?

The PORT in the datasource parameter is the port number postmaster is
listening to.  In the default case that's 5432.

The variables weren't defined, since you could have a large web site pulling
data from multiple database servers, on multiple postmasters (ports), and
multiple database names.

That _used_ to be in the documentation -- but it's been a long time since
I've
looked (a long time in this instance means five years or more, since I last
needed that information in 1997 for AOLserver 2.2.1).

I can, however, put that information (along with much needed general updates)
in the README file in the nspostgres distribution.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/



--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


[AOLSERVER] AOLserver 4.0 Beta release 8 now available

2003-05-30 Thread Mark Page

Beta release 8 of AOLserver 4.0 is now available with CVS tag aolserver_v4_r0_beta_8.
It is also available via the Source Forge download page:
  https://sourceforge.net/project/showfiles.php?group_id=3152release_id=162367

Please report bugs via SourceForge at:
  https://sourceforge.net/tracker/?group_id=3152atid=103152
with group "aolserver_v4_r0_beta_8"



Test On!



--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/



Re: [AOLSERVER] Instability with [ns_server all] under moderate load?

2003-05-30 Thread Eric Larkin



Jim,

Thanks for the prompt (and informative) 
reply; we've eliminated the call from our monitoring and the servers seem much 
more stable.

It makes intuitive sense that this would be 
a difficult function to implement in a thread-safe fashion, but I have to agree 
that it would be better if this factwere called out in big bold type 
somewhere in the API documentation. I've submitted a documentation bug in SourceForge 
(#745784); let me know if there is anything else I can/should do.

Eric


  -Original Message-From: AOLserver Discussion 
  [mailto:[EMAIL PROTECTED]On Behalf Of Jim 
  DavidsonSent: Thursday, May 29, 2003 8:47 AMTo: 
  [EMAIL PROTECTED]Subject: Re: [AOLSERVER] Instability with 
  [ns_server all] under moderate load?In a message dated 5/29/2003 2:28:56 AM Eastern Daylight 
  Time, [EMAIL PROTECTED] writes:
  We have been trying to debug occasional (1-4 times/day) unexplained 
servercrashes under moderate load. Our most recent testing points 
fairly stronglyto the command "[ns_server all]" which occurs in a trace 
filter we run forsystem monitoring purposes. We are currently 
testing an updated version ofthe filter which omits this command, but I 
would still be interested to knowif anyone has encountered instability 
with the use of ns_server in theirenvironment. The relevant 
snippet of code looks something like this:
  
  
  
  Hi,
  
  I don't believe "ns_server all" is thread safe and it would be expensive 
  to make it so. It's designed for occasional use in a debugging context, 
  not as part of regular connection processing. The docs should probably 
  be updated to make this clear.
  
  -Jim
  
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/



--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/



[AOLSERVER] nsdb0 handle and id (Was: Re: [AOLSERVER] postgres driver problem)

2003-05-30 Thread Lamar Owen
On Thursday 29 May 2003 06:38, Mohan Pakkurti wrote:
 I am trying to use the postgres driver with aolserver 4.0
 and get the following error. Does this make any sense? Is
 this some know bug? :) The same code works ok with aolserver3.

Ok, this error is occuring during initialization of OpenACS.  Can you send the
nsd.tcl file that belongs to this?

Jonathan Ellis reported a similar problem.  In his case, opening nscp, and
executing ns_db gethandle returned nsdb0.

I don't think it's a driver problem.  But I'm looking into it.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


[AOLSERVER] AOLserver developers -- debian on parisc

2003-05-30 Thread Naveen Agnihotri
I'd sent out an email a few days ago about having trouble
with AOLserver on a machine running debian on a parisc
processor.  It is specific to this machine, because I've
compiled AOLserver on a couple of other linuxes, and
everywhere else it works fine.

Basically, the problem is that AOLserver arbitrarily returns
400 Bad Request errors on some, but not all requests from
browsers.  Accessing it through telnet to the right port
causes it to throw an error all the time.  It probably has
to do with non-standard implementation of a library function
in the parisc version of debian.

After inserting a few Ns_Log statements, I've narrowed it
down to a call made in Ns_ConnRead in conn.c.  But my C
isn't good enough to go further (I'm a biologist), plus I
don't really understand the way socket handlers work in
general.

Can someone please help me out here?  I'm willing to dig
deeper, but need some tips on how to go about it.  Feel
free to email me privately at [EMAIL PROTECTED]

Thanks very much!
Naveen.


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] nsdb0 handle and id (Was: Re: [AOLSERVER] postgres driver problem)

2003-05-30 Thread tammy
Hi

I think this is an OACS issue... see
http://openacs.org/forums/message-view?message_id=94201
and related
http://openacs.org/forums/message-view?message%5fid=94977
   t

On Thursday, May 29, 2003, at 03:29  PM, Lamar Owen wrote:

On Thursday 29 May 2003 06:38, Mohan Pakkurti wrote:
I am trying to use the postgres driver with aolserver 4.0
and get the following error. Does this make any sense? Is
this some know bug? :) The same code works ok with aolserver3.
Ok, this error is occuring during initialization of OpenACS.  Can you
send the
nsd.tcl file that belongs to this?
Jonathan Ellis reported a similar problem.  In his case, opening nscp,
and
executing ns_db gethandle returned nsdb0.
I don't think it's a driver problem.  But I'm looking into it.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list:
http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/

[EMAIL PROTECTED]

Subverge LLC
www.subverge.com
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] nsdb0 handle and id (Was: Re: [AOLSERVER] postgres driver problem)

2003-05-30 Thread Vinod Kurup
On Thursday, May 29, 2003, at 06:29  PM, Lamar Owen wrote:

Ok, this error is occuring during initialization of OpenACS.  Can you
send the
nsd.tcl file that belongs to this?
Jonathan Ellis reported a similar problem.  In his case, opening nscp,
and
executing ns_db gethandle returned nsdb0.
I was getting a similar error, documented in this thread:

http://openacs.org/forums/message-view?message_id=94201

For some reason, using ns_eval causes an error the next time that
rp_filter is called. I couldn't figure out exactly why, but the ns_eval
call wasn't really needed, so I took it out and it seems to have fixed
the problem.
The full patch for OpenACS 4.6.x is here:

http://openacs.org/bugtracker/openacs/patch?patch_number=165

I'd be interested to know if this fixes the problem for others.

Vinod

--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] nsdb0 handle and id (Was: Re: [AOLSERVER] postgres driver problem)

2003-05-30 Thread Lamar Owen
On Thursday 29 May 2003 18:57, tammy wrote:
 I think this is an OACS issue... see
 http://openacs.org/forums/message-view?message_id=94201
 and related
 http://openacs.org/forums/message-view?message%5fid=94977

H.

So, Jonathan and Mohan, update to AOLserver 4b8 and Tcl 8.4.3 and see if the
error remain.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] nsdb0 handle and id (Was: Re: [AOLSERVER] postgres driver problem)

2003-05-30 Thread Lamar Owen
On Thursday 29 May 2003 19:03, Vinod Kurup wrote:
 On Thursday, May 29, 2003, at 06:29  PM, Lamar Owen wrote:
  Ok, this error is occuring during initialization of OpenACS.  Can you

 I was getting a similar error, documented in this thread:

 http://openacs.org/forums/message-view?message_id=94201

Interesting.  Your log is from Oracle, not PostgreSQL, thus vindicating the
driver... :-)

However, it seems that if ns_eval is causing this, then something is awry with
ns_eval somewhere.

The pool name is gleaned from an nsv, though.  Which beta first had the nsv
fix?
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] Instability with [ns_server all] under moderate load?

2003-05-30 Thread Nathan Folkman
In a message dated 5/29/2003 5:42:07 PM Central Standard Time, [EMAIL PROTECTED] writes:


I've submitted a documentation bug in SourceForge (#745784); let me know if there is anything else I can/should do.
 
Eric


Thanks - we'll be sure to take care of this one. ;-)


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/



Re: [AOLSERVER] AOLserver developers -- debian on parisc

2003-05-30 Thread Dossy
On 2003.05.29, Naveen Agnihotri [EMAIL PROTECTED] wrote:
 I'd sent out an email a few days ago about having trouble
 with AOLserver on a machine running debian on a parisc
 processor.  It is specific to this machine, because I've
 compiled AOLserver on a couple of other linuxes, and
 everywhere else it works fine.
[...]

 Can someone please help me out here?  I'm willing to dig
 deeper, but need some tips on how to go about it.  Feel
 free to email me privately at [EMAIL PROTECTED]

Can you provide non-root access to the box in question?  I
don't have access to a pa-risc arch box to try and diagnose
on ... anyone else have one?

-- Dossy

--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on. (p. 70)


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] nsdb0 handle and id (Was: Re: [AOLSERVER] postgres driver...

2003-05-30 Thread Mark Page
In a message dated 5/29/2003 8:01:23 PM Eastern Daylight Time, [EMAIL PROTECTED] writes:


The pool name is gleaned from an nsv, though. Which beta first had the nsv
fix?


Beta 6 had the fix for '712241: Creating empty nsv fails in AOLserver 4'.


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/