<div dir="ltr"><div><div><div>Opa <br></div>Sabe me dizer qual o numero desejado que eu possa colocar no <font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">/proc/sys/net/ipv4/tcp_max_orphans ? olha o exemplo como se encontra meu servidor <br>cat /proc/net/sockstat<br>sockets: used 2078<br>TCP: inuse 48 orphan 0 tw 0 alloc 147 mem 92<br>UDP: inuse 308 mem 362<br>UDPLITE: inuse 0<br>RAW: inuse 2<br>FRAG: inuse 0 memory 0<br><br></span></font></div><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">segue o status da memoria <br><br> cat /proc/meminfo<br>MemTotal: 264513800 kB<br>MemFree: 219963984 kB<br>Buffers: 1336744 kB<br>Cached: 36961456 kB<br>SwapCached: 0 kB<br>Active: 29503480 kB<br>Inactive: 9857496 kB<br>Active(anon): 2861124 kB<br>Inactive(anon): 9588060 kB<br>Active(file): 26642356 kB<br>Inactive(file): 269436 kB<br>Unevictable: 346900 kB<br>Mlocked: 246748 kB<br>SwapTotal: 264667128 kB<br>SwapFree: 264667128 kB<br>Dirty: 1312 kB<br>Writeback: 0 kB<br>AnonPages: 1398380 kB<br>Mapped: 10091028 kB<br>Shmem: 11323684 kB<br>Slab: 809776 kB<br>SReclaimable: 671508 kB<br>SUnreclaim: 138268 kB<br>KernelStack: 18448 kB<br>PageTables: 198124 kB<br>NFS_Unstable: 0 kB<br>Bounce: 0 kB<br>WritebackTmp: 0 kB<br>CommitLimit: 396924028 kB<br>Committed_AS: 85572944 kB<br>VmallocTotal: 34359738367 kB<br>VmallocUsed: 1449612 kB<br>VmallocChunk: 34155480696 kB<br>HardwareCorrupted: 0 kB<br>AnonHugePages: 364544 kB<br>HugePages_Total: 0<br>HugePages_Free: 0<br>HugePages_Rsvd: 0<br>HugePages_Surp: 0<br>Hugepagesize: 2048 kB<br>DirectMap4k: 5344 kB<br>DirectMap2M: 2078720 kB<br>DirectMap1G: 266338304 kB<br><br></span></font></div><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy">abraços <br></span></font><div><div><font color="navy" face="Arial"><span style="font-size:10pt;font-family:Arial;color:navy"><br></span></font></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">Em 13 de setembro de 2014 07:27, lscrlstld <span dir="ltr"><<a href="mailto:lscrlstld@gmail.com" target="_blank">lscrlstld@gmail.com</a>></span> escreveu:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div link="blue" vlink="purple" lang="PT-BR">
<div>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">Veja quantos sockets órfãos tem: <u></u><u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">cat /proc/net/sockstat<u></u><u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">Ajuste se for necessário:<u></u><u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">echo “nr desejado” >
/proc/sys/net/ipv4/tcp_max_orphans e para fixar configue no /etc/sysctl.conf<u></u><u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">Porém esse limite existe para proteger o
kernel de um ataque DDos pois cada socket aberto consome 64K da memória que não
pode fazer swap (unswappable memory)<u></u><u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">Veja tb se tem memória suficiente e cheque
quem está abrindo tantos sockets pois esse comportamento não é nada normal.<u></u><u></u></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"><u></u> <u></u></span></font></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><b><font face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma;font-weight:bold">De:</span></font></b><font face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma">
<a href="mailto:centos-pt-br-bounces@centos.org" target="_blank">centos-pt-br-bounces@centos.org</a> [mailto:<a href="mailto:centos-pt-br-bounces@centos.org" target="_blank">centos-pt-br-bounces@centos.org</a>] <b><span style="font-weight:bold">Em nome de </span></b>Cleiton Alves<br>
<b><span style="font-weight:bold">Enviada em:</span></b> sexta-feira, 12 de
setembro de 2014 16:51<br>
<b><span style="font-weight:bold">Para:</span></b> <u></u>Portuguese<u></u>
(Brazilian) CentOS mailing list<br>
<b><span style="font-weight:bold">Assunto:</span></b> [CentOS-pt-br] Error
kernel:TCP: too many of orphaned sockets</span></font><u></u><u></u></p>
</div><div><div class="h5">
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Boa noite senhores <u></u><u></u></span></font></p>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Verificando os logs do meu servidor constatei varias mensagens com esse
erro >> <u></u><u></u></span></font></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">kernel:TCP: too
many of orphaned sockets <u></u><u></u></span></font></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Pesquisando na net
nao achei nada muito concreto , uns casos fala para alterar alguns parametros
do kernel , outros falam para dar um reboot no servidor gostaria de saber se
alguem ja teve o mesmo problema e qual seria a soluçao ideal .<u></u><u></u></span></font></p>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Abs <u></u><u></u></span></font></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">-- <u></u><u></u></span></font></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><br>
<br>
<br>
<br>
<br>
<br>
<u></u><u></u></span></font></p>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Att: <br>
Cleiton Alves <br>
:(){ :|:& };:<br>
echo "b"> /proc/sysrq-trigger<u></u><u></u></span></font></p>
</div>
</div>
</div>
</div></div></div>
</div>
</div>
<br>_______________________________________________<br>
CentOS-pt-br mailing list<br>
<a href="mailto:CentOS-pt-br@centos.org">CentOS-pt-br@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos-pt-br" target="_blank">http://lists.centos.org/mailman/listinfo/centos-pt-br</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><br><br><br><br><br><br><br><div><br></div><div><br></div><div><br></div>Att: <br>Cleiton Alves <br>:(){ :|:& };:<br>echo "b"> /proc/sysrq-trigger</div>
</div>