Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

otobo.psgi: avoid database reconnect for every request #80

Closed
bschmalhofer opened this issue Jun 8, 2020 · 3 comments
Closed

otobo.psgi: avoid database reconnect for every request #80

bschmalhofer opened this issue Jun 8, 2020 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

In the mod_perl version for OTOBO the Perl module Apache::DBI. This module enables connection caching. However in otobo.psgi there is no connection caching and there seems to be a reconnect for each request.

In might be worthwhile to use DBIx::Connector in the OTOBO_RUNS_UNDER_PSGI case. Apache::DBImight do the job as well, but that is IMHO confusing.

@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Jun 15, 2020

DBIx::Connector looks good. See http://perladvent.org/2011/2011-12-22.html . A small downside is that the connector object needs to be cached. This can easily be done with a statevariable. The generation of the cache key can be copied from DBI::connect_cached().

bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue Jun 15, 2020
Sadly not using the nice features of DBIx::Connector
@bschmalhofer
Copy link
Contributor Author

The attribute RaiseError is now turned off in order to have the same behavior as previously,

@bschmalhofer bschmalhofer added this to the OTOBO 10.0 milestone Jul 1, 2020
@bschmalhofer bschmalhofer added the enhancement New feature or request label Jul 1, 2020
@bschmalhofer
Copy link
Contributor Author

Feature is implemented and no complaints so far. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant