Mobydick's picture

Hi !

I have a server with Turnkey Appliance LAMP.

In my script I have to connect to a Ingres Database on other Server via UnixOdbc.

I have this message with the command odbc_exec :

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 7304065007560425476 bytes)

Take in mind that in terminal session : I can have the result of a query with "isql DNSName". (UnixOdbc works fine).

I want to resolce the problem, but i don't khonw wher is it ? (In PHP, Apache, UnixOdbc or other)

who can I debug ?



PS : Here is a list of packages Installed :

||/ Name                              Version               Architecture          Description
ii  apache2                           2.2.22-13             amd64                 Apache HTTP Server metapackage
ii  apache2-utils                     2.2.22-13             amd64                 utility programs for webservers
ii  apache2.2-bin                     2.2.22-13             amd64                 Apache HTTP Server common binary files
ii  apache2.2-common                  2.2.22-13             amd64                 Apache HTTP Server common files
ii  php-pear                          5.4.4-14+deb7u5       all                   PEAR - PHP Extension and Application Repository
ii  php5                              5.4.36-0+deb7u3       all                   server-side, HTML-embedded scripting language (metapackage)
ii  php5-cli                          5.4.36-0+deb7u3       amd64                 command-line interpreter for the php5 scripting language
ii  php5-common                       5.4.36-0+deb7u3       amd64                 Common files for packages built from the php5 source
ii  php5-gd                           5.4.36-0+deb7u3       amd64                 GD module for php5
ii  php5-mcrypt                       5.4.36-0+deb7u3       amd64                 MCrypt module for php5
ii  php5-mysql                        5.4.36-0+deb7u3       amd64                 MySQL module for php5
ii  php5-odbc                         5.4.36-0+deb7u3       amd64                 ODBC module for php5
ii  php5-xcache                       2.0.0-4               amd64                 Fast, stable PHP opcode cacher
ii  php5-xdebug                       2.2.1-2               amd64                 Xdebug Module for PHP 5
ii  turnkey-core-13.0                 1                     all                   turnkey-core-13.0 release
ii  turnkey-lamp-13.0                 1                     all                   turnkey-lamp-13.0 release
ii  unixodbc                          2.2.14p2-5            amd64                 Basic ODBC tools

Jeremy Davis's picture

Unfortunately I have very little experience with working with remote DBs using ODBC. And none with PHP, or on Linux (my brief moment of ODBC was many years ago on Windows...)

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 7304065007560425476 bytes)

Would suggest to me that it's is running out of RAM.

Although there is obviously something not right...
536870912 bytes = ~500MB
7304065007560425476 bytes = ~7000PB!!!
So it's not a simple case of adjusting settings!

To assist troubleshooting it might be worth trying some PHP cli scripts to help narrow it down (at least remove Apache as a possible issue - although I doubt that it's the source of your problem).

Beyond that I'm not going to be much help. However if you keep in mind that TurnKey LAMP is essentially Debian Wheezy and software is installed from Debian repos; google might give you some more clues?!

Add new comment