mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +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:
committed by
Andreas Kling
parent
4451b4fda0
commit
d58a8b5146
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user