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

[email protected] (Clive Eisen) Wed, 9 Apr 2025 13:00:58 +0100
Newsgroups perl.dbi.users
Message-ID <[email protected]>
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) =
<[email protected]> wrote:
>=20
>=20
>=20
>> On Mar 31, 2025, at 4:20=E2=80=AFPM, Johnson, Bruce E - (bjohnson) =
<[email protected]> wrote:
>>=20
>> Sadly no. It=E2=80=99s still instantaneous on-prem but takes 61 =
seconds to get the database handle with the ip address. (and DNS =
resolves just fine )=20
>>=20
>>> On Mar 31, 2025, at 1:32=E2=80=AFAM, Mark Lawrence via dbi-users =
<[email protected]> wrote:
>>>=20
>>> External Email
>>>=20
>>>> 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.
>>>=20
>>> 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?
>>>=20
>>>> my $dbnamel=3D"host=3Dxxxxxxx.pharmacy.arizona.edu;sid=3Dxxxxxxx";
>>>> my =
$dbnamec=3D"host=3Dxxxxxxxx.us-west-2.rds.amazonaws.com;sid=3Dxxxxxxx";
>>>=20
>>> Maybe try with IP addresses?
>=20
> Turned out to be None of the above.
>=20
> Weirdly the delay was from using =
"$dbnamec=3D"host=3Dxxxxxxxx.us-west-2.rds.amazonaws.com;sid=3Dxxxxxxx=E2=80=
=9D;"  in the connection statement
>=20
> When I switched to using the tnsnames.ora configuration name for the =
connection
>=20
> $dbnamec=3D=E2=80=9CCLOUDTEST=E2=80=9D;
>=20
> It worked like a charm.
>=20
> --=20
> Bruce Johnson
> University of Arizona
> College of Pharmacy
> Information Technology Group
>=20
> Institutions do not have opinions, merely customs
>=20
>=20