Wednesday 31 July 2013

Communication Errors and Aborted Connections in MySQL

If connection problems occur such as communication errors or aborted connections, use these sources of information to diagnose problems:
The error log. See "The Error Log”
If you start the server with the --log-warnings option, you might find messages like this in your error log:

130728  4:58:05 [Warning] Aborted connection 1023 to db: 'xyz' user: 'opiuyijuy' host: 'abcd' (Got an error reading communication packets)
130728  4:58:07 [Warning] Aborted connection 2342 to db: 'mnb user: 'cvbnmxz' host: 'abcd' (Got an error reading communication packets)

If a client successfully connects but later disconnects improperly or is terminated, the server increments the Aborted_clients status variable, and logs an Aborted connection message to the error log.

The cause can be any of the following:
==>The client program did not call mysql_close() before exiting.
==>The client had been sleeping more than wait_timeout or interactive_timeout seconds without issuing any requests to the server.
==>The client program ended abruptly in the middle of a data transfer.

If a client is unable even to connect, the server increments the Aborted_connects status variable.Unsuccessful connection attempts can occur for the following reasons:
==>A client does not have privileges to connect to a database.
==>A client uses an incorrect password.
==>A connection packet does not contain the right information.
==>It takes more than connect_timeout seconds to get a connect packet. See Section 5.1.4, “Server System Variables”.

If these kinds of things happen, it might indicate that someone is trying to break into your server! Messages for these types of problems are logged to the general query log if it is enabled.Other reasons for problems with aborted clients or aborted connections:
==>The max_allowed_packet variable value is too small or queries require more memory than you have allocated for mysqld.“Packet Too Large”.
==>Use of Ethernet protocol with Linux, both half and full duplex. Many Linux Ethernet drivers have this bug.You should test for this bug by transferring a huge file using FTP between the client and server machines. If a transfer goes in burst-pause-burst-pause mode, you are experiencing a Linux duplex syndrome. Switch the duplex mode for both your network card and hub/switch to either full duplex or to half duplex and test the results to determine the best setting.
==>A problem with the thread library that causes interrupts on reads.
==>Badly configured TCP/IP.

Faulty Ethernets, hubs, switches, cables, and so forth. This can be diagnosed properly only by replacing hardware.

Tuesday 23 July 2013

ORA-00600: internal error code, arguments: [17059]

Getting ORA-600 [17059] on the database alert log file

Problem Explanation:

ORA-600 [17059] is a memory corruption error that occurs while building a table to hold the list of child cursor dependencies relating to a given parent cursor and we exceed the maximum possible size of the table.
identify why so many child cursors have been created, can you please check V$SQLAREA for a statement using a excessive number of child cursors, e.g.:

connect / as sysdba
spool cursor_info.txt
select version_count, sql_id, sql_text from v$sqlarea
where version_count > 5000 order by version_count;

and then for the statement with the largest version count, identify why they are not getting shared from V$SQL_SHARED_CURSOR, e.g.:

select * from v$sql_shared_cursor where address in (select address from v$sqlarea where sql_id = '<SQL_ID from above>');

Alert Log File shows;

Mon Jan 18 16:32:47 2010
Errors in file /orasys/ipay/udump/ipay_ora_24069.trc:
ORA-00600: internal error code, arguments: [17059], [0x4633429D8], [], [], [], [], [], []
Mon Jan 18 16:32:52 2010
Errors in file /orasys/ipay/udump/ipay_ora_24071.trc:
ORA-00600: internal error code, arguments: [17059], [0x4633429D8], [], [], [], [], [], []
Mon Jan 18 16:32:55 2010
Errors in file /orasys/ipay/udump/ipay_ora_24117.trc:
ORA-00600: internal error code, arguments: [17059], [0x4633429D8], [], [], [], [], [], []
Mon Jan 18 16:32:58 2010
Errors in file /orasys/ipay/udump/ipay_ora_24073.trc:

Trace Files Shows:

parent=463342af0 maxchild=32770 plk=46e81ca48 ppn=n
cursor instantiation=ffffffff7a730318 used=1263817964
child#32769(0) pcs=40d6be768
 clk=0 ci=0 pn=0 ctx=0
kgsccflg=0 llk[ffffffff7a730320,ffffffff7a730320] idx=0
xscflg=28 fl2=0 fl3=82080 fl4=0
sharing failure(s)=400
No bind info: cannot access child information block
and the oacdefs are not stored in the instantiation
Frames pfr 0 siz=0 efr 0 siz=0
Cursor frame dump
Session cached cursors

you can stop the ORA-600 [17059] errors occurring by flushing the shared pool using:
connect / as sysdba
alter system flush shared_pool;
alter system flush shared_pool;
alter system flush shared_pool;

Patch 5705795 would rectify the issue however it conflicts with patch 4367986.
A merged version of the patches is available for download from My Oracle Support as patch 7007477

Monday 22 July 2013

ora.diskmon OFFLINE status in oracle 11R2

After installation of the GRID Infrastructure release started to look for new stuff. The first think I noticed was the offline status of diskmon. When no Exedata is used diskmon will be offline by default.

Diskmon is used for Exadata fencing.

crsctl stat res -t -w "STATE = OFFLINE"
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
Local Resources
               OFFLINE OFFLINE      test_abc1
               OFFLINE OFFLINE      test_abc2

Tuesday 16 July 2013

ORA-27300: OS system dependent operation:fork failed with status: 2

When operating system is encountering with some unknown error like insufficient space in temp Area or swap Area or insufficient system resources then Oracle throws following errors.

ORA-27300: OS system dependent operation:fork failed with status: 2
ORA-27301: OS failure message: No such file or directory
ORA-27302: failure occurred at: skgpspawn5

On System: maxproc 128 to 16384             

ora11g@abc_test#  lsattr -E -l sys0 | grep -i maxuproc
maxuproc        16384              Maximum number of PROCESSES allowed per user      True

On DB: process 150 to 300

SQL> show parameter proce
processes   integer     300