


Record once and use strace to diagnose the problem of PHP occupying too much system resources.
Local environment: redhat6.7 system. nginx1.12.1, php7.1.0, the code uses the yii2 framework problem: the local web site needs to use the elasticsearch service. When PHP uses elasticsearch built on a local server, the local load is normal. When I use AWS's elasticsearch service, the load on the local server is often too high. Check the nginx and php logs and find no exceptions. The number of concurrent connections in the system is also not high. At this time, I thought of a strace diagnostic tool that our boss told me. Debugging process: Find a php sub-process idstrace-
May 03, 2024 pm 04:31 PM
Rsync file synchronization learning
First, let’s understand the general principle of rsync synchronization: Rsync synchronization uses the so-called “Rsync algorithm” to synchronize the files between the local and remote hosts. This algorithm only transmits different parts of the two files instead of each time. All are transmitted in full, so the transmission speed is quite fast. The Rsync server will open a service channel (port) 873 and wait for the client Rsync connection. When connecting, the Rsync server will check whether the password (passwd) matches. If it passes the password check, the file transfer can begin. When the first connection is completed, the entire file will be transferred once, and the next time only the difference between the two files will be transferred. Next, we will do the preliminary setup and complete the task requirements first.
May 02, 2024 pm 09:04 PM
Detailed explanation of Linux system disk
1. Disk classification. The current disk classifications on the market include: IDE disk (mostly used in PCs), SATA disk, SAS disk, SSD disk, etc. Most servers in enterprises are the latter two, and SATA disks are mostly used in enterprises. Some internal businesses and SAS disks are mostly used for external businesses (some business platforms). SATA disks currently have a maximum capacity of 4T, and SAS disks are generally between 300G and 600G. This type of capacity is most commonly used in enterprise production environments. The use of disks in actual production mainly depends on performance requirements, that is, disk reading. Writing speed. 2. Disk architecture: Enterprise-level servers have multiple disks. 3. Calculation of disk capacity. The structure of a disk generally includes tracks, disk surfaces, and sectors.
May 02, 2024 pm 04:31 PM
How to configure master-slave replication in MariaDB
In our previous tutorials, we have learned how to install and configure MariaDB[1], and also learned some basic commands for managing MariaDB[2]. Now let's learn how to configure a master-slave replication on the MariaDB server. Replication is used to create multiple copies of our database. These copies can be used to run queries on other databases. Some very heavy queries may affect the performance of the main database server, or we can use it for data redundancy. , or both of the above purposes. We can automate this process, that is, the replication process from the master server to the slave server is automatically performed. Perform backups without affecting writes on the primary server. So let's now configure our master-slave
May 01, 2024 pm 01:49 PM
Differences between Unix and Linux operating systems
In the computer age, a considerable number of people mistakenly believe that Unix and Linux operating systems are the same. However, the opposite is true. Let's take a closer look. What is Unix? In the IT field, Unix, known as the operating system, was developed by AT&T in New Jersey, USA in 1969 (its trademark rights are currently owned by the International Open Standards Organization). Most operating systems were inspired by Unix, which was also inspired by the unfinished Multics system. Another version of Unix is Play9 from Bell Laboratories. Where is Unix used? As an operating system, Unix is mostly used on servers, workstations, and now also on personal computers. it
May 01, 2024 am 08:55 AM
The evasive module protects your website from application layer DOS attacks
There are a variety of attack methods that can take a website offline, and the more complex methods involve technical knowledge of databases and programming. A simpler method is called a "DenialOfService" (DOS) attack. The name of this attack method comes from its intention: to cause normal service requests from ordinary customers or website visitors to be denied. Generally speaking, there are two forms of DOS attacks: the third and fourth layers of the OSI model, that is, the network layer attack. The seventh layer of the OSI model, that is, the application layer attack. The first type of DOS attack - the network layer, occurs when a large number of of junk traffic flows to the web server. When spam traffic exceeds the network's ability to handle it, the website goes down. The second type of DOS attack is at the application layer and uses combined
Apr 30, 2024 pm 05:34 PM
Analyzing the Patron Saint of Linux
The biggest differences between background processes and daemon processes are as follows: (a) The daemon process has completely separated from the terminal console, while the background program has not completely separated from the terminal (results will still be output to the terminal before the terminal is closed); (b) The daemon process will not be affected when closing the terminal console, and the background program will stop when the user exits. It needs to be run in nohupcommand& format to avoid the impact; (c) The session group, current directory, and file description of the daemon process The symbols are all independent. Background running is just a fork of the terminal to allow the program to execute in the background. These have not changed; the characteristics of the daemon process. The daemon is a special process that runs in the background. It is separated from the terminal, so that it can avoid running in the background.
Apr 29, 2024 pm 12:28 PM
One line to understand the causes and consequences of SSH login
SSH flow chart According to the flow chart, we can see the process of our program from the initial browser to the final page echo. If there is anything you don't understand, please leave a message. The Hibernate layer is mainly responsible for mapping files, injection of Action and Service, and responsible for calling between the three layers of background services. **JSP is equivalent to the HTML page in our asp.net. If it is the same as our HTML page, then it can also be used. Ajax can be written and our events can be triggered. Events are triggered through the action attribute. There will be an address in this attribute, which is specifically used to establish a connection with our backend.
Apr 29, 2024 am 09:10 AM
Come with me to learn Linux and install Nginx
Today, I will lead you to install Nginx in a Linux environment. The Linux system used here is CentOS7.2. Prepare the installation tools 1. Download Nginx from the Nginx official website. The version used here is: 1.13.6.2. Upload the downloaded Nginx to Linux. Here, the /opt/nginx directory is used as an example. Run "tar-zxvfnginx-1.13.6.tar.gz" to decompress. 3. Switch to the /opt/nginx/nginx-1.13.6 directory and run ./configure for initial configuration. If the following prompt appears, it means that PCRE is not installed on the machine, and Nginx needs to
Apr 28, 2024 pm 03:10 PM
Learn more about the difference between git fetch and git pull
Both gitfetch and gitpull can update the remote repository to the local one. So what are the differences between them? There are several concepts that have to be mentioned to clarify this issue. FETCH_HEAD: It is a version link, recorded in a local file, pointing to the end version of the branch that has been taken down from the remote warehouse. commit-id: After each local work is completed, a gitcommit operation will be performed to save the current work to the local repo. At this time, a commit-id will be generated, which is a serial number that uniquely identifies a version. After using gitpush, this serial number will also be synchronized to the remote warehouse. With the above concepts in mind, let’s talk about gitfetchg
Apr 27, 2024 pm 09:34 PM
How to use Fail2Ban to protect your server from brute force attacks
An important task for Linux administrators is to protect the server from illegal attacks or access. By default, Linux systems come with well-configured firewalls, such as iptables, Uncomplicated Firewall (UFW), ConfigServerSecurityFirewall (CSF), etc., which can prevent a variety of attacks. Any machine connected to the Internet is a potential target for malicious attacks. There is a tool called Fail2Ban that can be used to mitigate illegal access on the server. What is Fail2Ban? Fail2Ban[1] is an intrusion prevention software that protects servers from brute force attacks. It is written in Python programming language
Apr 27, 2024 am 08:34 AM
Run Linux on Android devices
Once upon a time, I tried searching for a simple way to run Linux on Android. My only intention at that time was just to use Linux and some basic applications like SSH, Git, awk, etc. Not asking for much! I don't want to root my Android device. I have a tablet that I use mainly for reading e-books, news, and a handful of Linux blogs. Other than that, I don't use it much. So I decided to use it to implement some Linux functions. If you also want to run Linux on your Android device, this article may be helpful to you. Termux - Android terminal emulator that runs on Android and ChromeOS
Apr 26, 2024 am 09:07 AM
Introducing 5 cool tools for Python
If you want to do your job well, you must first sharpen your tools. A good tool can get twice the result with half the effort. The Python community has provided enough excellent tools to help developers realize certain ideas more conveniently. The following tools provide My work also brings a lot of convenience, and I recommend it to you who pursue beautiful things. PythonTutor PythonTutor is a free educational tool developed by PhilipGuo, which can help students overcome basic obstacles in programming learning and understand the process of each line of source code in the computer when the program is executed. With this tool, teachers or students can write Python code directly in a web browser and run the program visually step by step. If you don't know how code runs in memory,
Apr 25, 2024 am 09:22 AM
Artifact Nmon
For example: nmon-f-s1. nmonCPUandDiskutilization will create a log file. The beginning of the log file is some system metadata (AAA-BBBV part), followed by regular snapshots of the monitored system properties, such as CPU and memory usage. This output file is difficult to process directly by a spreadsheet application, so the Nmon_Analyzerexcel macro was born. If you are using Windows/Mac and have Microsoft Office installed, this tool is very good. If you don’t have this environment, you can also use the Nmon2rrd tool. This tool can convert log files into RRD input files.
Apr 25, 2024 am 09:01 AM
Hot tools Tags

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article
How to fix KB5055523 fails to install in Windows 11?
How to fix KB5055518 fails to install in Windows 10?
Roblox: Grow A Garden - Complete Mutation Guide
Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
How to fix KB5055612 fails to install in Windows 10?

Hot Tools

vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version
Chinese version, very easy to use
