Connection pooling in perl


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Connection pooling in perl
# 1  
Old 05-04-2007
Connection pooling in perl

I am developing a web based application using perl. I need to use the concept of connection pooling in it. I am using apache server & my db is postgres. Can any one help me in this regard.

If any sample script or the site provide will be of greater help.



Thanks & Regards,
Alma
# 2  
Old 05-04-2007
For CGI-based Web application, most likely you can't because CGI scripts are executed fresh as a process with each access. All connections must be closed when the script is complete. So pooling has little use here.

You probably can implement it with mod_perl though. By designing your own mod_perl handler, you may likely implement this functionality as mod_perl handlers are persistent across requests. I have little experience with mod_perl, so I cannot give you much information.

But before you start implementing it yourself, take a look at these modules first. They should satisfy your requirements.

http://search.cpan.org/~pgollucci/Ap.../Apache/DBI.pm
http://search.cpan.org/~mws/Resource...sourcePool.pod
http://search.cpan.org/~mws/Resource...ce-DBI-1.0101/

Last edited by cbkihong; 05-04-2007 at 03:23 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Restrict remote DB connection from PERL

I have PERL code to connect to Oracle database using DBI. e.g. $PERL -e "use DBI; DBI->connect(qw(DBI:Oracle:db111 testu testpass));" by using DBI , if remote DB added to tnsnames.ora , I can connect using DBI . is there a way to restrict not to connect to remote DB using DBI ? ... (1 Reply)
Discussion started by: talashil
1 Replies

2. UNIX for Advanced & Expert Users

How keep running a program n an another computer via a connection ssh when the connection is closed?

Hi everybody, I am running a program on a supercomputer via my personal computer through a ssh connection. My program take more than a day to run, so when I left work with my PC I stop the connection with the supercomputer and the program stop. I am wondering if someone know how I can manage... (2 Replies)
Discussion started by: TomTomGre
2 Replies

3. Shell Programming and Scripting

Perl Oracle connection error

I've a Centralized Server which can connect to all Oracle Databases. When I was trying the below code it doesn't work, But tnsping was working fine. #!D:/perl5/bin/perl.exe use DBI; my $dbh = DBI->connect('dbi:Oracle:QBDIWCE', 'IDUSER', 'SECRET123#' ) || die( $DBI::errstr . "\n" ) ; ... (1 Reply)
Discussion started by: ilugopal
1 Replies

4. UNIX for Dummies Questions & Answers

Error Handling using ISQL for oracle connection in Perl

Hi Am making connection to oracle using ISQL as shown in the code. This code is just a minor part of a big code. I want to capture the error if the password/login is wrong or if connection is not made. I need to capture the error code also. Also, If such an error occurs, i need to exit out... (4 Replies)
Discussion started by: irudayaraj
4 Replies

5. UNIX for Dummies Questions & Answers

SSH Connection under Perl

Hi guys, I have an Active Perl version 5.12.2.1203 installed on my PC, I have a script that will perform some commands to the remote server by using SSH connection from local PC to remote server. I've found out that the Active Perl installed on my PC does not support such module, it only allows... (1 Reply)
Discussion started by: rymnd_12345
1 Replies

6. Solaris

Solaris 10 ftp connection problem (connection refused, connection timed out)

Hi everyone, I am hoping anyone of you could help me in this weird problem we have in 1 of our Solaris 10 servers. Lately, we have been having some ftp problems in this server. Though it can ping any server within the network, it seems that it can only ftp to a select few. For most servers, the... (4 Replies)
Discussion started by: labdakos
4 Replies

7. UNIX for Advanced & Expert Users

Connection reset by peer..closing connection

Hello I'm facing the above problem while doing a performance run. I've a script which I'm launching from my windows desktop using mozilla. The script will invoke backend action on a Solaris host which in turn feeds the records to a driver located on a linux box(Cent OS). What's happening is... (1 Reply)
Discussion started by: subramanyab
1 Replies

8. UNIX for Dummies Questions & Answers

ssh_exchange_identification: Connection closed by remote host Connection closed

Hi Everyone, Good day. Scenario: 2 unix servers -- A (SunOS) and B (AIX) I have an ftp script to sftp 30 files from A to B which happen almost instantaneously i.e 30 sftp's happen at the same time. Some of these sftp's fail with the following error: ssh_exchange_identification: Connection... (1 Reply)
Discussion started by: jeevan_fimare
1 Replies

9. Programming

Thread pooling in cpp on gnu linux

I m newb to thread pooling. I have to create a cpp application using thread pooling for gnu/linux machine. I didn't get too much on the net. Can any one give me the references to source code or conceptual document of thread pooling in cpp for gnu/linux. Any help will be appreciated. (4 Replies)
Discussion started by: ps_sach
4 Replies

10. Programming

Connection Pooling

Hi , Could anyone suggest how do you implement a Connection pool in C? Connection pool to store/reuse connections to any resource manager .. database, MQSeries. How is this done? Regards, VJ (0 Replies)
Discussion started by: vjsony
0 Replies
Login or Register to Ask a Question