Re: [EXT] Issues connecting to an Amazon RDS instance: creating the database handle is taking a VERY long time

2025-04-09 Thread Clive Eisen
Have you checked *reverse* dns on the ip - 60 of the 61 seconds sound like dns 
timeout.

> On 4 Apr 2025, at 20:56, Johnson, Bruce E - (bjohnson)  
> wrote:
> 
> 
> 
>> On Mar 31, 2025, at 4:20 PM, Johnson, Bruce E - (bjohnson) 
>>  wrote:
>> 
>> Sadly no. It’s still instantaneous on-prem but takes 61 seconds to get the 
>> database handle with the ip address. (and DNS resolves just fine ) 
>> 
>>> On Mar 31, 2025, at 1:32 AM, Mark Lawrence via dbi-users 
>>>  wrote:
>>> 
>>> External Email
>>> 
 The DB tools I use (Oracle SQL Developer and DBVisualizer) are working as 
 expected with the instances I have, but trying to run my Perl code using 
 DBI/DBD::Oracle/Oracle Instant Client is giving me  extreme delays 
 creating the DB handle; running a simple test program to time the process 
 shows the program taking a minute or longer to create the database handle.
>>> 
>>> My thoughts in such a scenario usually move towards DNS. I don't know if 
>>> DBI, or DBD::Oracle, or some Oracle library is doing name to address 
>>> translation, but perhaps IPv6 Happy Eyeballs is in play with a 60 second 
>>> timeout?
>>> 
 my $dbnamel="host=xxx.pharmacy.arizona.edu;sid=xxx";
 my $dbnamec="host=.us-west-2.rds.amazonaws.com;sid=xxx";
>>> 
>>> Maybe try with IP addresses?
> 
> Turned out to be None of the above.
> 
> Weirdly the delay was from using 
> "$dbnamec="host=.us-west-2.rds.amazonaws.com;sid=xxx”;"  in the 
> connection statement
> 
> When I switched to using the tnsnames.ora configuration name for the 
> connection
> 
> $dbnamec=“CLOUDTEST”;
> 
> It worked like a charm.
> 
> -- 
> Bruce Johnson
> University of Arizona
> College of Pharmacy
> Information Technology Group
> 
> Institutions do not have opinions, merely customs
> 
> 



Re: [EXT] Issues connecting to an Amazon RDS instance: creating the database handle is taking a VERY long time

2025-04-05 Thread Johnson, Bruce E - (bjohnson)


On Mar 31, 2025, at 4:20 PM, Johnson, Bruce E - (bjohnson) 
 wrote:

Sadly no. It’s still instantaneous on-prem but takes 61 seconds to get the 
database handle with the ip address. (and DNS resolves just fine )

On Mar 31, 2025, at 1:32 AM, Mark Lawrence via dbi-users  
wrote:

External Email

The DB tools I use (Oracle SQL Developer and DBVisualizer) are working as 
expected with the instances I have, but trying to run my Perl code using 
DBI/DBD::Oracle/Oracle Instant Client is giving me  extreme delays creating the 
DB handle; running a simple test program to time the process shows the program 
taking a minute or longer to create the database handle.

My thoughts in such a scenario usually move towards DNS. I don't know if DBI, 
or DBD::Oracle, or some Oracle library is doing name to address translation, 
but perhaps IPv6 Happy Eyeballs is in play with a 60 second timeout?

my $dbnamel="host=xxx.pharmacy.arizona.edu;sid=xxx";
my $dbnamec="host=.us-west-2.rds.amazonaws.com;sid=xxx";

Maybe try with IP addresses?

Turned out to be None of the above.

Weirdly the delay was from using 
"$dbnamec="host=.us-west-2.rds.amazonaws.com;sid=xxx”;"  in the 
connection statement

When I switched to using the tnsnames.ora configuration name for the connection

$dbnamec=“CLOUDTEST”;

It worked like a charm.

--
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group

Institutions do not have opinions, merely customs




Re: [EXT] Issues connecting to an Amazon RDS instance: creating the database handle is taking a VERY long time

2025-04-01 Thread Mark Lawrence via dbi-users

On Tue Apr 01, 2025 at 10:53:25AM +, Mark Lawrence via dbi-users wrote:


1521, which I guess is the DBI default.


Or rather[1], upon re-reading the link, port 1526, but you get the idea.

[1] I'm not an Oracle user.. :-/

--
Mark Lawrence


Re: [EXT] Issues connecting to an Amazon RDS instance: creating the database handle is taking a VERY long time

2025-04-01 Thread Mark Lawrence via dbi-users
On Mon Mar 31, 2025 at 11:20:11PM +, Johnson, Bruce E - (bjohnson) 
wrote:
Sadly no. It’s still instantaneous on-prem but takes 61 seconds to get 
the database handle with the ip address. (and DNS resolves just fine )


Second idea: you aren't explicitly specifying the connection port. 
There is evidence[1] of someone else observing a timeout related to 
1521, which I guess is the DBI default.


[1] 
https://dba.stackexchange.com/questions/60688/perl-dbi-takes-60-seconds-to-connect-to-an-oracle-database-every-single-time

What is your cloud database listening on? As the post suggests, setting 
DBI_TRACE will provide more food for investigation.


--
Mark Lawrence


Re: [EXT] Issues connecting to an Amazon RDS instance: creating the database handle is taking a VERY long time

2025-03-31 Thread Johnson, Bruce E - (bjohnson)
Sadly no. It’s still instantaneous on-prem but takes 61 seconds to get the 
database handle with the ip address. (and DNS resolves just fine )

On Mar 31, 2025, at 1:32 AM, Mark Lawrence via dbi-users  
wrote:

External Email

The DB tools I use (Oracle SQL Developer and DBVisualizer) are working as 
expected with the instances I have, but trying to run my Perl code using 
DBI/DBD::Oracle/Oracle Instant Client is giving me  extreme delays creating the 
DB handle; running a simple test program to time the process shows the program 
taking a minute or longer to create the database handle.

My thoughts in such a scenario usually move towards DNS. I don't know if DBI, 
or DBD::Oracle, or some Oracle library is doing name to address translation, 
but perhaps IPv6 Happy Eyeballs is in play with a 60 second timeout?

my $dbnamel="host=xxx.pharmacy.arizona.edu;sid=xxx";
my $dbnamec="host=.us-west-2.rds.amazonaws.com;sid=xxx";

Maybe try with IP addresses?

--
Mark Lawrence


--
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group

Institutions do not have opinions, merely customs