Questions tagged [apache-dbi]

6 questions
3
votes
1 answer

Apache::DBI->connect_on_init database connection unused

I have mod perl 2 code that is doing Apache::DBI->connect_on_init($dsn, $user, $passwd); in a script loaded by PerlRequire. But when processing a request, doing DBI->connect_cached($dsn, $user, $passwd) is creating an additional connection, not…
ysth
  • 96,171
  • 6
  • 121
  • 214
1
vote
0 answers

Does DBIx::Connector address the "per process basis" limitation of Apache::DBI?

Apache::DBI's docs say: Apache::DBI [...] has a limitation: it keeps database connections persistent on a per process basis. [...In] a heavy loaded Web-site where every user connects to the database with a unique userid[, e]very server would…
Kev
  • 15,899
  • 15
  • 79
  • 112
1
vote
1 answer

Creating new database handles with mod_perl

I've run into an issue when stress testing mod_perl that the database connections are going away. I suspect that processes are sharing database connections, causing the issue. But I've followed all instructions for Apache::DBI, and can't figure this…
lschult2
  • 588
  • 2
  • 5
  • 16
0
votes
1 answer

How to selectively start and end a persistent Apache::DBI for perl from the client/browser?

This question is related to our web-based application, which uses perl, apache, Apache::DBI and a database (MySQL, SQLite, or anything). We know that Apache::DBI is used to create persistent db connections. These connections live in memory from the…
Vijey
  • 6,536
  • 7
  • 43
  • 50
0
votes
2 answers

What is the safe way to use fork with Apache::DBI under mod_perl2?

I have a problem when I use Apache::DBI in child processes. The problem is that Apache::DBI provides a single handle for all processes which use it, so I get DBD::mysql::db selectall_arrayref failed: Commands out of sync; you can't run this…
codeholic
  • 5,680
  • 3
  • 23
  • 43
0
votes
2 answers

Safe design for SET SESSION AUTHORIZATION multi-user mod-perl2 connection caching

I have a mod_perl2.0.4 / Apache2.2 web app running on CentOS 6.4 with PostgreSQL 9.0. Until recently, I had this setup: Apache::DBI and DBI->connect_cached for all connections, which was starting to give FATAL: sorry, too many clients already even…
Kev
  • 15,899
  • 15
  • 79
  • 112