The Samba-Bugzilla – Attachment 5048 Details for
Bug 6837
"Too many open files" when trying to access large number of files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
New patch to try and fix farmanager
look1 (text/plain), 2.13 KB, created by
Jeremy Allison
on 2009-12-02 17:00:51 UTC
(
hide
)
Description:
New patch to try and fix farmanager
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2009-12-02 17:00:51 UTC
Size:
2.13 KB
patch
obsolete
>diff --git a/source3/include/local.h b/source3/include/local.h >index 45767ad..a88b17b 100644 >--- a/source3/include/local.h >+++ b/source3/include/local.h >@@ -56,7 +56,25 @@ > #define SYSLOG_FACILITY LOG_DAEMON > #endif > >-/* >+/* >+ * Fudgefactor required for open tdb's, etc. >+ */ >+ >+#ifndef MAX_OPEN_FUDGEFACTOR >+#define MAX_OPEN_FUDGEFACTOR 20 >+#endif >+ >+/* >+ * Minimum number of open files needed for Windows7 to >+ * work correctly. A little conservative but better that >+ * than run out of fd's. >+ */ >+ >+#ifndef MIN_OPEN_FILES_WINDOWS >+#define MIN_OPEN_FILES_WINDOWS 16384 >+#endif >+ >+/* > * Default number of maximum open files per smbd. This is > * also limited by the maximum available file descriptors > * per process and can also be set in smb.conf as "max open files" >@@ -64,9 +82,9 @@ > */ > > #ifndef MAX_OPEN_FILES >-#define MAX_OPEN_FILES 10000 >+#define MAX_OPEN_FILES (MIN_OPEN_FILES_WINDOWS + MAX_OPEN_FUDGEFACTOR) > #endif >- >+ > #define WORDMAX 0xFFFF > > /* the maximum password length before we declare a likely attack */ >diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c >index cd27fe4..ccf642d 100644 >--- a/source3/param/loadparm.c >+++ b/source3/param/loadparm.c >@@ -4692,6 +4692,22 @@ static int max_open_files(void) > #endif > #endif > >+ if (sysctl_max < MIN_OPEN_FILES_WINDOWS) { >+ DEBUG(2,("max_open_files: sysctl_max (%d) below " >+ "minimum Windows limit (%d)\n", >+ sysctl_max, >+ MIN_OPEN_FILES_WINDOWS)); >+ sysctl_max = MIN_OPEN_FILES_WINDOWS; >+ } >+ >+ if (rlimit_max < MIN_OPEN_FILES_WINDOWS) { >+ DEBUG(2,("rlimit_max: rlimit_max (%d) below " >+ "minimum Windows limit (%d)\n", >+ rlimit_max, >+ MIN_OPEN_FILES_WINDOWS)); >+ rlimit_max = MIN_OPEN_FILES_WINDOWS; >+ } >+ > return MIN(sysctl_max, rlimit_max); > } > >diff --git a/source3/smbd/files.c b/source3/smbd/files.c >index 6f82686..03d2f58 100644 >--- a/source3/smbd/files.c >+++ b/source3/smbd/files.c >@@ -155,8 +155,6 @@ void file_close_pid(uint16 smbpid, int vuid) > Initialise file structures. > ****************************************************************************/ > >-#define MAX_OPEN_FUDGEFACTOR 20 >- > void file_init(void) > { > int request_max_open_files = lp_max_open_files();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6837
:
5035
|
5036
|
5037
|
5039
|
5047
|
5048
|
5098