Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm in the process of migrating a Mojolicious application that is hosted on a FreeBSD server to an Ubuntu server.

I had no problem installing all the packages and modules needed and got the application up and running in no time.
However I'm running into a problem when I query any SQL Server DB field of type varchar(max). Once the application hits one of these selectrow_array queries I get an Out of memory! error and it crashes.

I'm currently working on getting it running in a VM before I migrate it to the production server. I've tried to crank up the VM's memory, made the swap huge, I've configured the ulimit, and I've configured the the freetds config text size.
If I cast the field to varchar(8000) in the SELECT statement, everything runs perfectly fine. It's only when querying a field of type varchar(max). I know that the data that is being queried currently while testing is only about 1000 characters.

I'm at a stand still here. I cannot figure out what would cause this out of memory error.

What am I missing? Any help would be greatly appreciated.

Replies are listed 'Best First'.
Re: DBD::SYBASE varchar(max) problem
by haukex (Archbishop) on Sep 26, 2018 at 18:16 UTC
      Hmm. I came across that as well. I just find it odd that the exact same code will run perfectly fine on the freeBSD setup but on ubuntu this problem exists.
      I'm going to compare versions of sybase, DBD, and the likes and see if there is any difference.