Basically, I've got 10 PHP scripts trying to run simultaneously. script1.php, script2.php, script3.php.. etc. They are all doing work on 2000 MySQL table entries, for example: "SELECT * FROM tableExample LIMIT 0, 2000", and each is making CURL requests to figure things out on each entry. I actually want to run a few hundred instances. I executed a dozen instances, and 7 start returning responses, while the others just hang. Nothing is actually processed from the ones that are hanging either; as soon as one of the 7 active ones finishes, a hanging one will begin to work and start output. Each script only consumes less than 1% of the servers resources. The whole server is using less than 15% resources at any time.
I'm on a dedicated server with CentOS 7.5, 16GB mem, quad core, WHM/cpanel. My PHP memory limit is set to 4GB. I've included the my.cnf if it helps. My apache limits and clients are 256/150, which is well beyond what I'm trying to do.
I appreciate any suggestions or ideas!
Code: Select all
[mysql]
# CLIENT #
port=3306
socket="/var/lib/mysql/mysql.sock"
[mysqld]
slow-query-log=1
long_query_time=1
# GENERAL #
user=mysql
default-storage-engine=InnoDB
socket="/var/lib/mysql/mysql.sock"
pid-file="/var/lib/mysql/mysql.pid"
# MyISAM #
key-buffer-size=32M
myisam-recover="FORCE,BACKUP"
# SAFETY #
max-allowed-packet=1G
max-connect-errors=1000000
# DATA STORAGE #
datadir="/var/lib/mysql/"
# BINARY LOGGING #
log-bin="/var/lib/mysql/mysql-bin"
expire-logs-days=14
sync-binlog=1
# CACHES AND LIMITS #
tmp-table-size=32M
max-heap-table-size=32M
query-cache-type=0
query-cache-size=0
max-connections=5000
thread-cache-size=50
open-files-limit=65535
table-definition-cache=1024
table-open-cache=2048
# INNODB #
innodb-flush-method=O_DIRECT
innodb-log-files-in-group=2
innodb-flush-log-at-trx-commit=2
innodb-file-per-table=1
innodb-buffer-pool-size=6G
# LOGGING #
log-error="/var/lib/mysql/mysql-error.log"
log-queries-not-using-indexes=1
innodb_buffer_pool_size=134217728
max_allowed_packet=268435456
port=5123