[ZBX-16525] What do the sql queries do? Created: 2019 Aug 16 Updated: 2020 Jun 03 Resolved: 2020 Jun 03 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Andrzej | Assignee: | Zabbix Support Team |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Server: Centos 7.2 |
Sprint: | Sprint 57 (Oct 2019), Sprint 58 (Nov 2019), Sprint 59 (Dec 2019), Sprint 60 (Jan 2020), Sprint 61 (Feb 2020), Sprint 62 (Mar 2020), Sprint 63 (Apr 2020), Sprint 64 (May 2020), Sprint 65 (Jun 2020) |
Description |
I have a problem whit sql queries because they cause all error ORA-04030. "out of process memory when trying to allocate (32KB to 120KB)". Very funny because the database has PGA=2GB. If I make the sql query manually it works ok but if the server makes the sql query there is a memory error. I analyzed the operation of the database with my database department and they said that the database is working properly and probably the application has a problem. I found sql queries in the zabbix server log in alert log database is only error ORA-04030. I search this item 459689 in my database in first sql and this is discovery item.
1. [Z3005] query failed: [-1] ORA-04030: out of process memory when trying to allocate 32792 bytes (QERHJ hash-joi,QERHJ Bit vector) [select distinct g.graphid,g.name,g.width,g.height,g.yaxismin,g.yaxismax,g.show_work_period,g.show_triggers,g.graphtype,g.show_legend,g.show_3d,g.percent_left,g.percent_right,g.ymin_type,g.ymin_itemid,g.ymax_type,g.ymax_itemid from graphs g,graphs_items gi,items i,item_discovery id where g.graphid=gi.graphid and gi.itemid=i.itemid and i.itemid=id.itemid and id.parent_itemid=459689]
2. [Z3005] query failed: [-1] ORA-04030: out of process memory when trying to allocate 123416 bytes (QERHJ hash-joi,kllcqas:kllsltba) [select min(t.nextcheck) from httptest t,hosts h where t.hostid=h.hostid and mod(t.httptestid,10)=1 and t.status=0 and h.proxy_hostid is null and h.status=0 and (h.maintenance_status=0 or h.maintenance_type=0)]
3. [Z3005] query failed: [-1] ORA-04030: out of process memory when trying to allocate 123416 bytes (QERHJ hash-joi,kllcqas:kllsltba) [select ip.item_preprocid,ip.itemid,ip.step,ip.type,ip.params from item_discovery id join item_preproc ip on id.itemid=ip.itemid where id.parent_itemid in (352688,352689,352690,352691)]
4. [Z3005] query failed: [-1] ORA-04030: out of process memory when trying to allocate 123416 bytes (QERGH hash-agg,kllcqas:kllsltba) [select distinct t.triggerid,t.description,t.expression,t.status,t.type,t.priority,t.comments,t.url,t.recovery_expression,t.recovery_mode,t.correlation_mode,t.correlation_tag,t.manual_close from triggers t,functions f,items i,item_discovery id where t.triggerid=f.triggerid and f.itemid=i.itemid and i.itemid=id.itemid and id.parent_itemid=82835]
5. [Z3005] query failed: [-1] ORA-04030: out of process memory when trying to allocate 64544 bytes (sort subheap,sort key) [select t.itemid,t.type,t.snmp_community,t.snmp_oid,t.hostid,t.key_,t.delay,t.status,t.value_type,t.trapper_hosts,t.snmpv3_securityname,t.snmpv3_securitylevel,t.snmpv3_authpassphrase,t.snmpv3_privpassphrase,t.lastlogsize,t.logtimefmt,t.params,t.ipmi_sensor,t.authtype,t.username,t.password,t.publickey,t.privatekey,t.mtime,t.flags,t.interfaceid,t.port,t.snmpv3_authprotocol,t.snmpv3_privprotocol,t.snmpv3_contextname,t.jmx_endpoint,t.timeout,t.url,t.query_fields,t.posts,t.status_codes,t.follow_redirects,t.post_type,t.http_proxy,t.headers,t.retrieve_mode,t.request_method,t.output_format,t.ssl_cert_file,t.ssl_key_file,t.ssl_key_password,t.verify_peer,t.verify_host,t.allow_traps from items t,hosts r where t.hostid=r.hostid and r.proxy_hostid=13570 and r.status in (0,1) and t.type in (0,7,1,4,6,12,2,3,9,10,11,13,14,16,17,5,19) order by t.itemid]
|
Comments |
Comment by DaneT [ 2019 Aug 19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hello Andrzej How often do you execute these queries? Could be that previous one has not been completed yet. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Andrzej [ 2019 Aug 19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Server Zabbix in version 4.0.3 we are soon upgrading to 4.2.5. This error ORA-04030 occured when we change version Zabbix Server 3.2 to 4.0. Then it helped to increase the PGA in the database. Oracle work only for Zabbix Server. These queries are made by Zabbix Server, not me at different times. I found this queries in Zabbix Server log. First querie select from four table graphs, graphs_items, items, item_discovery. But why does the Zabbix Server do these queries if we don't use charts in zabbix (only a few but without LLD)? I will add that the database is from version 2.0 and only upgrade. I suspect that the error is somewhere in the LLD regarding graphs, because the problem described below occurs for different LLDs. LLD for first queries: 1.select distinct g.graphid,g.name,g.width,g.height,g.yaxismin,g.yaxismax,g.show_work_period,g.show_triggers,g.graphtype,g.show_legend,g.show_3d,g.percent_left,g.percent_right,g.ymin_type,g.ymin_itemid,g.ymax_type,g.ymax_itemid from graphs g,graphs_items gi,items i,item_discovery id where g.graphid=gi.graphid and gi.itemid=i.itemid and i.itemid=id.itemid and id.parent_itemid=459689 I do: A. select * from item_discovery where parent_itemid=459689; get 3 Items. (459690, 459691, 459692). B. select * from items where itemid=459690 this is item whit zabbix key_ = net.if.in[{#IFNAME}] C. select * from hosts where hostid=16833; Found host AND there are no Graph and Graph prototypes. D. select * from graphs_items where itemid=459690 Rows 0 for this tree Items (459690, 459691, 459692). E. I did a manual query in the database from point 1. zero rows, execution time 0.032 seconds. No memory error. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Glebs Ivanovskis [ 2019 Aug 20 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Have you tried tuning kernel limits on DB server? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Andrzej [ 2019 Aug 20 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Yes. We changed the setting of "ulimit" in Solaris. unlimit -a We're thinking about restarting the database. These error ORA-04030 slow down the writing of new data to the database and slow down the frontend.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Andrzej [ 2019 Oct 11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hi. I update zabbix server 4.0.3 to 4.2.6. In my team we determine to pic up memory and swap for user Oracle (projects in Solaris) and restart database. It helped, the error ORA-04030 disappeared.
But after upgrade I have new problem : 19052:20191011:093557.946 [Z3005] query failed: [-1] ORA-06550: line 2, column 1:
----- Error Stack Dump ----- ORA-06550: line 2, column 1: PLS-00103: Encountered the symbol "END" when expecting one of the following: ( begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << continue close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe purge ----- Current SQL Statement for this session (sql_id=c70mm65m2wszv) ----- begin end;
Output oracle.trc before and after the error occurred ORA-06550.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Glebs Ivanovskis [ 2019 Oct 13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||