Sometimes when we open the Dezhi forum, the following errors show up as an amber error:

Warning: include.... open files in ClassLoader.php on line 378

Let's find out how we can resolve it.

572bef295c0a0.png

Sometimes when we open the Dezhi forum, the following errors show up as an amber error: ```` Warning: include.... open files in ClassLoader.php on line 378 ```` Let's find out how we can resolve it. ![572bef295c0a0.png](serve/attachment&path=572bef295c0a0.png)

Project 'Clam' founder

So first thought was, maybe the system default open-file parameter needs some bump up. Let's do it, bump from 1024 to 63536


[root@forum ~]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 15091
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 15091
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[root@forum ~]# ulimit -n
1024
[root@forum ~]# vi /etc/security/limits.conf


[root@forum ~]# cat /etc/security/limits.conf
#Added by Adam
*       soft nofile 63536
*       hard nofile 63536


[root@forum ~]# ulimit -n 63536
[root@forum ~]# ulimit -n
63536
[root@forum ~]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 15091
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 63536
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 15091
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
So first thought was, maybe the system default open-file parameter needs some bump up. Let's do it, bump from 1024 to 63536 ```` [root@forum ~]# ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 15091 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 15091 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited [root@forum ~]# ulimit -n 1024 [root@forum ~]# vi /etc/security/limits.conf [root@forum ~]# cat /etc/security/limits.conf #Added by Adam * soft nofile 63536 * hard nofile 63536 [root@forum ~]# ulimit -n 63536 [root@forum ~]# ulimit -n 63536 [root@forum ~]# ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 15091 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 63536 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 15091 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited ````

Project 'Clam' founder

edited May 6 '16 at 2:35 am

By the way, above is more likely a walkaround for the open-file issue. Chances are in the Forum coding there are either some bugs (forget to close files), or some configuration which I just turned off the debug feature of oauth.

Meanwhile I figure out if we restarted the Apache HTTP service then the error also gone. So I schedule a cron job to restart the HTTP service daily which seems quite stupid but in fact, it's very effective.

Hopefully it will get resolved.

By the way, above is more likely a walkaround for the open-file issue. Chances are in the Forum coding there are either some bugs (forget to close files), or some configuration which I just turned off the debug feature of oauth. Meanwhile I figure out if we restarted the Apache HTTP service then the error also gone. So I schedule a cron job to restart the HTTP service daily which seems quite stupid but in fact, it's very effective. Hopefully it will get resolved.

Project 'Clam' founder

edited May 6 '16 at 2:39 am
180
views
2
replies
0
followers
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft