Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
IOS Hotels
and
IOS Rentals
online booking systems for Elxis CMS.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
Database
»
Need Help: Oracle-Fatal error: Allowed memory size of 8388608 bytes exhausted
« previous
next »
Print
Pages: [
1
]
Author
Topic: Need Help: Oracle-Fatal error: Allowed memory size of 8388608 bytes exhausted (Read 10576 times)
muharihar
Jr. Member
Posts: 77
muharihar
Need Help: Oracle-Fatal error: Allowed memory size of 8388608 bytes exhausted
«
on:
March 11, 2009, 05:03:04 »
hi guys...
i need help to fix this problem:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 41 bytes) in /opt/lampp/htdocs/sakwebelx/websakelx/includes/Core/database.php on line 335.
the line 335 is:
protected function _cursorReplacer() {
$compatDrivers = array ('oci8', 'oci805', 'oci8po', 'oracle');
if (in_array($this->_resource->databaseType, $compatDrivers)) {
$newfields = array();
if (isset($this->_cursor->fields) && is_array($this->_cursor->fields) && (count($this->_cursor->fields) > 0)) {
foreach ($this->_cursor->fields as $key => $val) {
$low = preg_replace('/^('.$this->compatPrefix.')/', '', strtolower($key));
$newfields[$low] = $val;
}
$this->_cursor->fields = $newfields;
}
if (isset($this->_cursor->_array) && is_array($this->_cursor->_array) && (count($this->_cursor->_array) > 0)) {
$newarray = array();
foreach ($this->_cursor->_array as $k => $a) {
if (is_array($a) && (count($a) > 0)) {
foreach ($a as $key => $val) {
$low = preg_replace('/^('.$this->compatPrefix.')/', '', strtolower($key));
$newarray[$k][$low] = $val;
--> LINE 335
}
}
}
$this->_cursor->_array = $newarray;
}
}
}
Note:
1. Elxis With Oracle as the database
2. Linux (Red had) as the OS
«
Last Edit: March 11, 2009, 05:08:29 by muharihar
»
Logged
how technology and nature stand together!
---------------------------------------------------
www.OmahIjo.net
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Need Help: Oracle-Fatal error: Allowed memory size of 8388608 bytes exhausted
«
Reply #1 on:
March 11, 2009, 10:48:13 »
This is where Elxis applies the compatibility prefix (qq) for Oracle. This happens because Oracle has some column names as reserved. For instance "access". The compatibility prefix will be added to reserved names, so "access" will become "qqaccess" for Oracle. I need to see the query to understand why the replacement procedure halts. Can you enable debug and copy-paste here the query with the problem?
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
muharihar
Jr. Member
Posts: 77
muharihar
Re: Need Help: Oracle-Fatal error: Allowed memory size of 8388608 bytes exhausted
«
Reply #2 on:
March 17, 2009, 03:49:36 »
the query is (not elxis database, i make a nother db connection to access this query):
SELECT SUBSTR (a.kd_jenis_nilai, 0, sys_str_pos (a.kd_jenis_nilai, '|') - 1) kode,
SUBSTR (a.kd_jenis_nilai, sys_str_pos (a.kd_jenis_nilai, '|') + 1, 100) kode_1,
a.label_nilai label,
SUBSTR (a.label_nilai, sys_str_pos (a.label_nilai, '|') + 1, 100) label_1,
a.nilai_1 jumlah, TO_CHAR (tgl_generate, 'DD-MM-YYYY HH24:MI') tgl,
DECODE ('PROP',
'PROP', kd_lokasi_2,
'KAB', kd_lokasi_3,
'KEC', kd_lokasi_4,
'DES', kd_lokasi_5,
kd_lokasi_6
) kode_induk
FROM wh_tm_lap a
WHERE kd_jenis_lokasi = 'PROP'
AND kd_lap = '104002'
AND kd_lokasi_1 = '34'
AND kd_lokasi_2 = '04'
AND kd_tipe_lap = '102'
AND kd_waktu_1 = '2009'
AND kd_waktu_2 = '03'
AND tgl_generate =
(SELECT MAX (tgl_generate)
FROM wh_tm_lap a
WHERE kd_jenis_lokasi = 'PROP'
AND kd_lap = '104002'
AND kd_lokasi_1 = '34'
AND kd_lokasi_2 = '04'
AND kd_tipe_lap = '102'
AND kd_waktu_1 = '2009'
AND kd_waktu_2 = '03')
ORDER BY a.kd_lokasi_1, a.kd_lokasi_2, kd_lokasi_3, kd_lokasi_4, kd_lokasi_5, kode, kode_1;
but, after i increased the php
memory_limit
to
12M
. the problem is solved.
i don't know why (the error) it's happen, maybe caused by memory leak?
thanks...
«
Last Edit: March 17, 2009, 03:52:21 by muharihar
»
Logged
how technology and nature stand together!
---------------------------------------------------
www.OmahIjo.net
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Need Help: Oracle-Fatal error: Allowed memory size of 8388608 bytes exhausted
«
Reply #3 on:
March 17, 2009, 08:46:13 »
I guess this is because of the DECODE and SUBSTR functions, they consume some more memory...
Increase php's memory to 32mb or even 64mb, today servers have plenty of memory. The 8mb limit is a standard of the previous decade...
«
Last Edit: March 17, 2009, 08:48:29 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Database
»
Need Help: Oracle-Fatal error: Allowed memory size of 8388608 bytes exhausted