out of memory query

out of memory query

am 11.11.2010 11:49:59 von Silvio Brandani

Hi alls,

Running a big query I got an out of memory error, this hapeens only
from application , the query run via psql return quickly the result,
instead the application (through odbc) fail with an out of memory error.

please help.


Following mylog:


[5244-889.537]CC_send_query: conn=021440D0, query='select * from bigone '
[5244-889.537]send_query: done sending query 33bytes flushed
[5244-889.538]in QR_Constructor
[5244-889.538]exit QR_Constructor
[5244-889.538]read -1, global_socket_buffersize=4096
[5244-889.538]Lasterror=10035
[5244-927.622]read 104, global_socket_buffersize=4096
[5244-927.622]send_query: got id = 'C'
[5244-927.623]send_query: ok - 'C' - BEGIN
[5244-927.623]send_query: setting cmdbuffer = 'BEGIN'
[5244-927.623]send_query: got id = 'E'
[5244-927.623]send_query: 'E' - SERROR
[5244-927.624]send_query: 'E' - C53200
[5244-927.624]send_query: 'E' - Mout of memory
[5244-927.625]send_query: 'E' - DFailed on request of size 8.
[5244-927.625]send_query: 'E' - Faset.c
[5244-927.626]send_query: 'E' - L716
[5244-927.626]send_query: 'E' - RAllocSetAlloc
[5244-927.627]read -1, global_socket_buffersize=4096
[5244-927.627]Lasterror=10035
[5244-927.751]read 6, global_socket_buffersize=4096
[5244-927.751]send_query: got id = 'Z'
[5244-927.752] done sending the query:
[5244-927.752]SC_set_Result(3729008, 37148c0)[5244-927.752]QResult:
enter DESTRUCTOR
[5244-927.753]STATEMENT ERROR: func=SC_execute, desc='(null)', errnum=7,
errmsg='Error while executing the query'
[5244-927.759]CONN ERROR: func=SC_execute, desc='(null)', errnum=110,
errmsg='ERROR: out of memory
Failed on request of size 8.'
[5244-927.762]retval=-1
[5244-927.762]PGAPI_ExecDirect: returned -1 from PGAPI_Execute
[5244-927.763]CC_send_query: conn=021440D0, query='ROLLBACK'
[5244-927.763]send_query: done sending query 14bytes flushed
[5244-927.764]in QR_Constructor
[5244-927.764]exit QR_Constructor
[5244-927.764]read 20, global_socket_buffersize=4096
[5244-927.764]send_query: got id = 'C'
[5244-927.764]send_query: ok - 'C' - ROLLBACK
[5244-927.764]send_query: setting cmdbuffer = 'ROLLBACK'
[5244-927.765]send_query: returning res = 0378EF38
[5244-927.765]send_query: got id = 'Z'
[5244-927.765]CC_on_abort in
[5244-927.765]CC_abort: sending ABORT!
[5244-927.765]QResult: enter DESTRUCTOR
[5244-927.766]QResult: in QR_close_result
[5244-927.766]QResult: free memory in, fcount=0
[5244-927.766]QResult: free memory out
[5244-927.766]QResult: enter DESTRUCTOR
[5244-927.766]QResult: exit close_result
[5244-927.767]QResult: exit DESTRUCTOR
[5244-927.767][[SQLGetDiagFieldW]] Handle=(3,03729008) Rec=1 Id=4
info=(0012E8F4,12)
[5244-927.767]PGAPI_GetDiagField entering
rec=1[5244-927.767]ER_ReturnError: status = 7, msg = #ERROR: out of memory
Failed on request of size 8.;
Error while executing the query#
[5244-927.768] szSqlState = '53200',len=82, szError='(null)'
[5244-927.768]PGAPI_GetDiagField exiting 0
[5244-927.768][[SQLGetDiagFieldW]] Handle=(3,03729008) Rec=2 Id=4
info=(0012E8F4,12)
[5244-927.769]PGAPI_GetDiagField entering
rec=2[5244-927.769]ER_ReturnError: status = 7, msg = #ERROR: out of memory
Failed on request of size 8.;
Error while executing the query#
[5244-927.769]PGAPI_GetDiagField exiting 100
[5244-927.769][SQLGetDiagRecW][5244-927.769]PGAPI_GetDiagRec entering
type=3 rec=1
[5244-927.769]ER_ReturnError: status = 7, msg = #ERROR: out of memory
Failed on request of size 8.;
Error while executing the query#
[5244-927.770] szSqlState = '53200',len=82, szError='ERROR: out
of memory
Failed on request of size 8.;
Error while executing the query'
[5244-927.770]PGAPI_GetDiagRec exiting 0
[5244-927.771][SQLGetDiagRecW][5244-927.771]PGAPI_GetDiagRec entering
type=3 rec=2
[5244-927.771]ER_ReturnError: status = 7, msg = #ERROR: out of memory
Failed on request of size 8.;
Error while executing the query#
[5244-927.772]PGAPI_GetDiagRec exiting 100
[5244-927.772][SQLCancel][5244-927.772]PGAPI_Cancel: entering...
[5244-927.772][SQLCancel][5244-927.772]PGAPI_Cancel: entering...
[5244-1015.115][[SQLEndTran]][5244-1015.116]entering PGAPI_Transact:
hdbc=021440D0, henv=00000000


Following psqlodbc log:


[889.537]conn=021440D0, query='select * from bigone '
[927.624]ERROR from backend during send_query: 'SERROR'
[927.624]ERROR from backend during send_query: 'C53200'
[927.624]ERROR from backend during send_query: 'Mout of memory'
[927.625]ERROR from backend during send_query: 'DFailed on request of
size 8.'
[927.625]ERROR from backend during send_query: 'Faset.c'
[927.626]ERROR from backend during send_query: 'L716'
[927.626]ERROR from backend during send_query: 'RAllocSetAlloc'
[927.752]STATEMENT ERROR: func=SC_execute, desc='(null)', errnum=7,
errmsg='Error while executing the query'
[927.753]
------------------------------------------------------------
[927.754] hdbc=021440D0, stmt=03729008, result=037148C0
[927.754] prepare=0, internal=0
[927.754] bindings=0371C4A8, bindings_allocated=63
[927.754] parameters=00000000, parameters_allocated=0
[927.755] statement_type=0, statement='select * from
bigone '
[927.755] stmt_with_params='select * from bigone '
[927.755] data_at_exec=-1, current_exec_param=-1, put_data=0
[927.756] currTuple=-1, current_col=-1, lobj_fd=-1
[927.756] maxRows=0, rowset_size=1, keyset_size=0,
cursor_type=0, scroll_concurrency=1
[927.757] cursor_name='SQL_CUR03729008'
[927.757] ----------------QResult Info
-------------------------------
[927.757] fields=0370ACC8, backend_tuples=00000000,
tupleField=0, conn=00000000
[927.758] fetch_count=0, num_total_rows=0, num_fields=0,
cursor='(NULL)'
[927.758] message='ERROR: out of memory
Failed on request of size 8.', command='(NULL)', notice='(NULL)'
[927.759] status=7, inTuples=0
[927.759]CONN ERROR: func=SC_execute, desc='(null)', errnum=110,
errmsg='ERROR: out of memory
Failed on request of size 8.'
[927.760]
------------------------------------------------------------
[927.760] henv=02148BE8, conn=021440D0, status=1, num_stmts=16
[927.761] sock=0214F9D8, stmts=02149F20, lobj_type=-999
[927.761] ---------------- Socket Info
-------------------------------
[927.761] socket=544, reverse=0, errornumber=0, errormsg='(NULL)'
[927.762] buffer_in=34921792, buffer_out=58221136
[927.762] buffer_filled_in=6, buffer_filled_out=0,
buffer_read_in=6
[927.763]conn=021440D0, query='ROLLBACK'


Thanks



Silvio

---






Utilizziamo i dati personali che la riguardano esclusivamente per nostre finalità amministrative e contabili, anche quando li comunichiamo a terzi. Informazioni dettagliate, anche in ordine al Suo diritto di accesso e agli altri Suoi diritti, sono riportate alla pagina http://www.savinodelbene.com/privacy.html
Se avete ricevuto questo messaggio per errore Vi preghiamo di ritornarlo al mittente eliminandolo assieme agli eventuali allegati, ai sensi art. 616 codice penale http://www.savinodelbene.com/privacy/codice_penale_616.html
L'Azienda non si assume alcuna responsabilità giuridica qualora pervengano da questo indirizzo messaggi estranei all'attività lavorativa o contrari a norme.
--

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: out of memory query

am 11.11.2010 18:07:25 von Hiroshi Inoue

(2010/11/11 19:49), Silvio Brandani wrote:
> Hi alls,
>
> Running a big query I got an out of memory error, this hapeens only from
> application , the query run via psql return quickly the result, instead
> the application (through odbc) fail with an out of memory error.
>
> please help.

Do you close the cursors after executing queries?

regards,
Hiroshi Inoue

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc