X-Windowには最大クライアント数がありますか?
たとえば、Windowsを使用して「無制限の」数のevinceプロセスを作成できますか?そうでない場合の制限は何ですか?
Lubuntu 18.04の別の例(以下の例ではワインクライアントを使用していますが、答えはXクライアントがワインに関連しているかどうかに応じて変わる可能性があると思います)
$ evince my.pdf
Maximum number of clients reachedUnable to init server: Could not connect: Connection refused
Cannot parse arguments: Cannot open display:
$ wine PDFXCview.exe my.pdf
047d:fixme:ver:GetCurrentPackageId (0x32fbc4 (nil)): stub
Maximum number of clients reached047d:err:winediag:x11drv_init_thread_data x11drv: Can't open display: :0. Please ensure that your X server is running and that $DISPLAY is set correctly.
一部のウィンドウ(.exeプログラムのウィンドウまたはevinceウィンドウ)を閉じてから、新しいウィンドウ(他のpdfファイルの場合)を開くことができます。
.exeプログラムを使用して102個のウィンドウを開き、5個のウィンドウが開いていることを示しました。 Xサーバーにウィンドウが多すぎますか?この問題をどのように解決できますか?
最大数量制限を増やすことはできますか?クライアント数を制限するいくつかの構成設定はありますか?どのように再構成できますか?
私は読んだhttps://askubuntu.com/questions/4499/how-can-i-diagnose-debug-maximum-number-of-clients-reached-x-errorsそして最大 x クライアント数は何ですか?しかし、まだ私の問題を把握することはできません。
ありがとうございます。
ベストアンサー1
からxorg.conf(5)
:
SERVERFLAGS SECTION ... Option "MaxClients" "integer" Set the maximum number of clients allowed to connect to the X server. Acceptable values are 64, 128, 256 or 512.
そして次からXserver(1)
:
-maxclients 64|128|256|512 Set the maximum number of clients allowed to connect to the X server. Acceptable values are 64, 128, 256 or 512.
デフォルトは256ですが、最新バージョンのXサーバーでは2048に増やすことができます。
./include/misc.h:#define MAXCLIENTS 2048
./include/misc.h:#define LIMITCLIENTS 256 /* Must be a power of 2 and <= MAXCLIENTS */
./os/osinit.c:int LimitClients = LIMITCLIENTS;
NextAvailableClient()
チェックインできますdix/dispatch.c
AllocNewConnection()
そしてos/connection.c
すべての詳細を確認してください。
多くのLinuxディストリビューションでは、これを使用してクライアント制限を512に設定できます。
# printf 'Section "ServerFlags"\n\tOption "MaxClients" "512"\nEndSection\n' \
> /etc/X11/xorg.conf.d/99-maxclients.conf
非常に大きな値を使用してXorg
バイナリ(実際のバイナリではない)を実行しようとすると、このオプションでどの値がサポートされているかがわかります。Xorg.wrap
-maxclients
/usr/lib/xorg/Xorg -maxclients 1000000000
...
(EE) maxclients must be one of 64, 128, 256, 512, 1024 or 2048
実際にディスプレイに接続されているクライアントの数は、拡張によって取得できますX-Resource
。xrestop
top
X11クライアントとそれらが使用しているリソースを同様の方法で表示するアプリケーションです。