Solaris 11 - opened files limit ?


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Solaris 11 - opened files limit ?
# 1  
Old 03-12-2019
Solaris 11 - opened files limit ?

Hey all,

I'm running apache (cswapache2) on a Solaris 11.3 server.

Recently, if I create a new vhost, the service fails to restart, and enters in maintenance mode.
If I comment lines with log files, the service starts again.

I guess I've reached the limit.

I checked the current values with ulimit -a and get :
Code:
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
open files                      (-n) 256
pipe size            (512 bytes, -p) 10
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 29995
virtual memory          (kbytes, -v) unlimited

I can increase the limit, but would like to be sure that it's the issue.
Did anyone experienced it too ?
# 2  
Old 03-12-2019
Quote:
If I comment lines with log files, the service starts again.
It rings alarm bells with me if commenting out log directives makes it work.

Where are the logs specified to go????

They should be like:

Code:
logs/website1

and NOT

Code:
logs/website1/logfile

As far as I remember, and I might be wrong, Apache cannot access a subdirectory of the logs directory and will crash on startup.
# 3  
Old 03-13-2019
@hicksd8 :

For each vhost, a specific log file is specified such as :

Code:
<VirtualHost *:443>
        ServerName blablabla . com
        SSLEngine On
                SSLProtocol ALL -SSLv2 -SSLv3
                SSLCipherSuite ECDHE-RSA-AES256-SHA384:AES256-SHA256:!RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM;
                SSLHonorCipherOrder on
        <Proxy *>
                AddDefaultCharset Off
                Order deny,allow
                Allow from all
        </Proxy>
        Redirect permanent /]h t t p://bliblibli.com
        ErrorLog "/opt/csw/apache2/var/log/error_default.blablabla.lu_443.log"
        TransferLog "/opt/csw/apache2/var/log/access_default.blablabla.lu_443.log"
</VirtualHost>


Last edited by RudiC; 03-13-2019 at 06:42 AM..
# 4  
Old 03-13-2019
Referring back to your post#1, if you were hitting a system wide files open limit or something like that, you should be able to test for that easily by running another application or script which opens, say, 20 files. If you were against a files open limit that app/script would fall over. I am inclined to believe that this is an Apache configuration error. Being able to comment out logfile directives and it then works tells me this is the case.

Referring to your post#3 it immediately strikes me that you are specifying a TransferLog directive without a prior LogFormat directive (so how does it know what it has to log???). I think your need to check out the configuration via the Apache bible:
mod_log_config - Apache HTTP Server Version 2.4

Perhaps someone on this forum with more Apache experience than I will help you more.
# 5  
Old 03-13-2019
I'm running apache 2.2, and the syntax looks to match with apache wiki's examples
wiki.apache.org / httpd/ExampleVhosts

<VirtualHost *:80>
ServerName w w w . foo . com

# if you want this vhost to listen to extra names, uncomment the next line
# ServerAlias foo . com w w w . bar . com bar . com

DocumentRoot /var/www/www . foo . com/htdocs

CustomLog /var/log/apache/www . foo . com-access . log combined
ErrorLog /var/log/apache/www . foo . com-error . log
</VirtualHost>
# 6  
Old 03-13-2019
Yes, but your post#5 shows an illustration of the use of 'CustomLog' directive BUT in your post#3 you are using the 'TransferLog' directive. They are different.

Look again at the link that I provided in my post#4 and read what is says about 'TransferLog'. It's format cannot be specified explicitly but is taken from a prior 'LogFormat' directive.
This User Gave Thanks to hicksd8 For This Post:
# 7  
Old 03-13-2019
Peek the running process for their files:
Code:
pfiles <pid>

Examine all the httpd processes in one go:
Code:
pfiles `pgrep httpd`

Are they close to 256?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script or alias to backup all files opened by vi

we want to backup all opened files by vi before editing also with version information. i wrote below alias to backup crontab file content with version info. What i want know is to make this opened files by vi. We want to prevent user mistakes by adding this alias. alias crontab='DATE=$(date... (4 Replies)
Discussion started by: sebu
4 Replies

2. Shell Programming and Scripting

File exists, but cannot be opened.How to check- whether it could be opened to read when it exists

Hi #Testing for file existence if ; then echo 'SCHOOL data is available for processing' else echo 'SCHOOL DATA IS NOT AVAILABLE FOR PROCESSING' : i wrote a script, where it begins by checking if file exists or not. If it exists, it truncates the database... (2 Replies)
Discussion started by: rxg
2 Replies

3. Solaris

How to change directory limit in Solaris?

Hi, I am using Solaris 10. i was trying to make a new directory in /u04 but it don't let me make directory unless i remove some other directories. i issued the following command df -F ufs -o i Filesystem iused ifree %iused Mounted on /dev/dsk/c1t0d0s0 ... (2 Replies)
Discussion started by: malikshahid85
2 Replies

4. UNIX for Advanced & Expert Users

Number of files currently opened in linux

Hello, How do i check number of files currently opening in the linux server? Your help is highly appreciated. Thank you ---------- Post updated at 02:43 PM ---------- Previous update was at 02:19 PM ---------- never mind!! I got it. ---------- Post updated at 02:44 PM ---------- Previous... (3 Replies)
Discussion started by: govindts
3 Replies

5. Solaris

limit on Solaris username lengths?

Hi this question applies to Solaris 8,9,10 and opensolaris as in my environment it applies to all of these Is there a limit on the size of the username (in /etc/passwd) or indeed does there come a point where, like the 8 character limitation of passwords, the system receives the input but... (6 Replies)
Discussion started by: hcclnoodles
6 Replies

6. Solaris

How to set Root password age limit in Solaris 9/10

Hi Friends, Can anyone tell me how can I set the password age limit for root user to 14 days....??? Also would like to add following for root password; min-alpha --- 4 min-other --- 1 min-length -- 6 min-diff ----- 3 How can I do these on command line....??? Regards, jumadhiya (7 Replies)
Discussion started by: jumadhiya
7 Replies

7. Shell Programming and Scripting

multiple files opened in awk

Hi , i' d like to use an awk script to automate the ripping of cds : here's how it works : - i first create a file named songs.txt containing the name of the songs - the scripts extracts the tracks of a cd with cdparanoia - the scripts saves the contents of the dir with ls (ls > list.txt) -... (0 Replies)
Discussion started by: krhamidou
0 Replies

8. HP-UX

How to get the opened files by a process

Hi, i'd like to get the files which are opened by a process during his execution using the c language. Thanks for helping me. (2 Replies)
Discussion started by: benoit.gaillard
2 Replies

9. Solaris

SUN Solaris 9 - Is there a 2GB file size limit?

Hi I am using SUN/Solaris 9 and I was told that some unix versions have 2GB size limit. Does this applies to SUN/Solaris 9? Thanks. (2 Replies)
Discussion started by: GMMike
2 Replies

10. UNIX for Dummies Questions & Answers

Linux/Solaris has any limit on folder size ?

Hi, Does Linux/Solaris has any limit on folder size or number of files per folder? Thanks Bache Gowda (1 Reply)
Discussion started by: bache_gowda
1 Replies
Login or Register to Ask a Question