Score:0

Weird traffic behavior on Ubuntu server

cy flag
top - 19:51:36 up 1 day, 12:27,  1 user,  load average: 19.14, 11.33, 4.74
Tasks: 172 total,  18 running, 154 sleeping,   0 stopped,   0 zombie
%Cpu(s): 90.0 us, 10.0 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :   3924.0 total,    120.4 free,   2610.0 used,   1193.6 buff/cache
MiB Swap:      0.0 total,      0.0 free,      0.0 used.    941.7 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                  
    771 mysql     20   0 1556952 279940  24304 S  32.6   7.0  30:56.22 mariadbd                                 
  29097 www-data  20   0  339948 141608 101920 S   9.0   3.5   0:18.89 php-fpm8.1                               
  30384 www-data  20   0  338684 123368  84640 S   8.0   3.1   0:07.28 php-fpm8.1                               
  30447 www-data  20   0  265324 119164  80944 S   7.6   3.0   0:03.64 php-fpm8.1                               
  29075 www-data  20   0  342040 143976 102292 R   7.3   3.6   0:18.82 php-fpm8.1                               
  29077 www-data  20   0  342544 141992 100212 S   7.3   3.5   0:18.61 php-fpm8.1                               
  29080 www-data  20   0  337880 139352 101512 S   7.3   3.5   0:19.57 php-fpm8.1                               
  29096 www-data  20   0  342696 135420  93324 S   7.3   3.4   0:19.19 php-fpm8.1                               
  30480 www-data  20   0  263212 116284  80948 R   7.0   2.9   0:03.32 php-fpm8.1                               
  29081 www-data  20   0  343960 145220 102344 R   6.3   3.6   0:19.51 php-fpm8.1                               
  29083 www-data  20   0  341832 147984 106652 R   6.3   3.7   0:19.64 php-fpm8.1                               
  30461 www-data  20   0  262568 116828  81392 S   6.3   2.9   0:03.44 php-fpm8.1                               
  29099 www-data  20   0  333984 139052 105076 S   5.6   3.5   0:18.75 php-fpm8.1                               
  30389 www-data  20   0  269556 128568  86728 S   5.6   3.2   0:07.31 php-fpm8.1                               
  29071 www-data  20   0  333664 135496 101712 S   5.3   3.4   0:18.18 php-fpm8.1                               
  29078 www-data  20   0  340072 145504 105396 R   5.0   3.6   0:19.07 php-fpm8.1                               
  29067 www-data  20   0  344384 149188 104908 S   4.7   3.7   0:20.48 php-fpm8.1                               
  29068 www-data  20   0  340848 145260 104740 R   4.7   3.6   0:19.62 php-fpm8.1                               
  29089 www-data  20   0  340640 142000 101852 S   4.7   3.5   0:18.29 php-fpm8.1                               
  29069 www-data  20   0  342024 143872 102916 R   4.3   3.6   0:19.58 php-fpm8.1                               
  30460 www-data  20   0  264580 119612  81264 S   4.3   3.0   0:03.42 php-fpm8.1                               
  29074 www-data  20   0  340340 140500 100172 S   4.0   3.5   0:18.47 php-fpm8.1                               
  29092 www-data  20   0  344636 150688 106044 R   4.0   3.8   0:19.23 php-fpm8.1                               
  30411 www-data  20   0  267404 127852  86636 S   4.0   3.2   0:07.14 php-fpm8.1                               
  30471 www-data  20   0  265632 125208  85940 R   4.0   3.1   0:03.37 php-fpm8.1                               
  30479 www-data  20   0  261100 115708  80948 R   3.7   2.9   0:03.37 php-fpm8.1                               
  30410 www-data  20   0  263372 124840  88940 S   3.3   3.1   0:07.33 php-fpm8.1                               
  29108 www-data  20   0  342156 144036 101852 R   3.0   3.6   0:18.73 php-fpm8.1                               
  29079 www-data  20   0  335704 136392 101532 S   2.3   3.4   0:18.60 php-fpm8.1                               
  29088 www-data  20   0  340560 142920 102436 S   2.0   3.6   0:18.71 php-fpm8.1                               
  30473 www-data  20   0  266632 120868  81400 R   2.0   3.0   0:03.36 php-fpm8.1                               
  29076 www-data  20   0  338140 139328 101968 R   1.3   3.5   0:19.29 php-fpm8.1                               
  30402 www-data  20   0  261292 115064  81188 S   1.3   2.9   0:07.14 php-fpm8.1                               
  30406 www-data  20   0  263372 123068  85740 S   1.3   3.1   0:07.09 php-fpm8.1                               
  30407 www-data  20   0  259976 122144  88364 S   1.3   3.0   0:07.34 php-fpm8.1                               
  30472 www-data  20   0  260632 115724  81268 R   1.3   2.9   0:03.26 php-fpm8.1                               
  29093 www-data  20   0  332700 134536 102308 S   1.0   3.3   0:19.05 php-fpm8.1                               
  29095 www-data  20   0  346088 150316 105324 S   1.0   3.7   0:18.31 php-fpm8.1                               
  29098 www-data  20   0  338568 140688 102360 R   1.0   3.5   0:19.10 php-fpm8.1                               
  30470 www-data  20   0  266792 121852  81396 R   1.0   3.0   0:03.38 php-fpm8.1                               
     13 root      20   0       0      0      0 S   0.3   0.0   0:00.74 ksoftirqd/0  

yet no traffic in google analytics what is this opening so many connections can somebody tell me a good way to figure it out?

Score:1
ua flag

(Addressing "weird")

Your web server will use some number of "child processes" (based on some config parameter). Each new PHP request will be sent to one of them. They sit around waiting for a new task; the most of programs you see "running" apparently are really running since they are using a small, but non-trivial (eg, 1%), amount of CPU.

They are probably all connecting (and disconnecting when finished) to MariaDB (mariadbd). This is fine.

Do note that a single PHP program can spawn any number of other pages. AJAX is one way to achieve this.

Crypto Coupons avatar
cy flag
what are this bots ? crawlers ? how can I see where this visitors come from that are opening so many connections.
ua flag
Your machine? In the cloud? Hosted by someone else?
Crypto Coupons avatar
cy flag
in the cloud but managed by me yes
Wilson Hauck avatar
jp flag
Please post your code responsible for 'Connect', 'Process', 'Close' connection. It is likely connections are not being closed after processing your client request. And post 15 seconds of General Log to verify you have "Quit" posted to confirm you are Closing the connection, please.
Wilson Hauck avatar
jp flag
Your 4G server is being overrun by 18 running processes. Consider in my.cnf [mysqld] section innodb_thread_concurrency=10 to limit the fighting for concurrent resources. What is your core count on the server?
ua flag
@WilsonHauck - MariaDB 10.5 deprecates innodb_thread_concurrency and removes it in 10.6: https://mariadb.com/docs/skysql/ref/mdb/system-variables/innodb_thread_concurrency/
Crypto Coupons avatar
cy flag
root@ubuntu-s-1vcpu-1gb-amd-sfo3-01:/etc/php/8.1/fpm# mysql -V mysql Ver 15.1 Distrib 10.6.12-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
Wilson Hauck avatar
jp flag
@CryptoCoupons From your MySQL Command Prompt, what is result of SELECT @@version; ? I have a feeling it is not SkySQL.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.