gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 02/02: Added special log message to report exceeded syst


From: gnunet
Subject: [libmicrohttpd] 02/02: Added special log message to report exceeded system limit on number of threads
Date: Sun, 05 Dec 2021 10:05:16 +0100

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 4e9c66466d1ce9ef036ca483fe7d0fc91b9966fb
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Dec 5 12:05:06 2021 +0300

    Added special log message to report exceeded system limit on number of 
threads
---
 src/microhttpd/daemon.c | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 4b7df545..b320177a 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -2803,10 +2803,18 @@ new_connection_process_ (struct MHD_Daemon *daemon,
     {
       eno = errno;
 #ifdef HAVE_MESSAGES
+#ifdef EAGAIN
+      if (EAGAIN == eno)
+        MHD_DLOG (daemon,
+                  _ ("Failed to create a new thread because it would have " \
+                     "exceeded the system limit on the number of threads or " \
+                     "no system resources available.\n"));
+      else
+#endif /* EAGAIN */
       MHD_DLOG (daemon,
                 _ ("Failed to create a thread: %s\n"),
                 MHD_strerror_ (eno));
-#endif
+#endif /* HAVE_MESSAGES */
       goto cleanup;
     }
   }
@@ -7158,10 +7166,18 @@ MHD_start_daemon_va (unsigned int flags,
                                       daemon) )
       {
 #ifdef HAVE_MESSAGES
+#ifdef EAGAIN
+        if (EAGAIN == errno)
+          MHD_DLOG (daemon,
+                    _ ("Failed to create a new thread because it would have " \
+                       "exceeded the system limit on the number of threads or 
" \
+                       "no system resources available.\n"));
+        else
+#endif /* EAGAIN */
         MHD_DLOG (daemon,
                   _ ("Failed to create listen thread: %s\n"),
                   MHD_strerror_ (errno));
-#endif
+#endif /* HAVE_MESSAGES */
         MHD_mutex_destroy_chk_ (&daemon->new_connections_mutex);
         MHD_mutex_destroy_chk_ (&daemon->cleanup_connection_mutex);
         MHD_mutex_destroy_chk_ (&daemon->per_ip_connection_mutex);
@@ -7284,6 +7300,14 @@ MHD_start_daemon_va (unsigned int flags,
                                         d))
         {
 #ifdef HAVE_MESSAGES
+#ifdef EAGAIN
+          if (EAGAIN == errno)
+            MHD_DLOG (daemon,
+                      _ ("Failed to create a new pool thread because it would 
" \
+                         "have exceeded the system limit on the number of " \
+                         "threads or no system resources available.\n"));
+          else
+#endif /* EAGAIN */
           MHD_DLOG (daemon,
                     _ ("Failed to create pool thread: %s\n"),
                     MHD_strerror_ (errno));

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]