mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
LibWebView+UI: Raise the chrome process open file limit
The default limit (at least on Linux) causes us to run out of file descriptors at around 15 tabs. Increase this limit to 8k. This is a rather arbitrary number, but matches the limit set by Chrome.
This commit is contained in:
parent
4451b4fda0
commit
d58a8b5146
Notes:
github-actions[bot]
2024-07-23 07:40:33 +00:00
Author: https://github.com/trflynn89
Commit: d58a8b5146
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/764
4 changed files with 15 additions and 4 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <AK/ByteString.h>
|
||||
#include <LibCore/Process.h>
|
||||
#include <LibCore/StandardPaths.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibIPC/ConnectionToServer.h>
|
||||
#include <LibWebView/ChromeProcess.h>
|
||||
|
||||
|
@ -22,6 +23,14 @@ private:
|
|||
UIProcessClient(NonnullOwnPtr<Core::LocalSocket>);
|
||||
};
|
||||
|
||||
ErrorOr<ChromeProcess> ChromeProcess::create()
|
||||
{
|
||||
// Increase the open file limit, as the default limits on Linux cause us to run out of file descriptors with around 15 tabs open.
|
||||
TRY(Core::System::set_resource_limits(RLIMIT_NOFILE, 8192));
|
||||
|
||||
return ChromeProcess {};
|
||||
}
|
||||
|
||||
ErrorOr<ChromeProcess::ProcessDisposition> ChromeProcess::connect(Vector<ByteString> const& raw_urls, bool new_window)
|
||||
{
|
||||
static constexpr auto process_name = "Ladybird"sv;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue