diff --git a/docs/PHP/danog/MadelineProto/RPCError/ChannelInvalidError.md b/docs/PHP/danog/MadelineProto/RPCError/ChannelInvalidError.md new file mode 100644 index 0000000000..3646c60eac --- /dev/null +++ b/docs/PHP/danog/MadelineProto/RPCError/ChannelInvalidError.md @@ -0,0 +1,99 @@ +--- +title: "danog\\MadelineProto\\RPCError\\ChannelInvalidError: The provided channel is invalid." +description: "\nNote: this exception is part of the raw API, and thus is not covered by the backwards-compatibility promise.\n\nAlways check the changelog when upgrading, and use tools like Psalm to easily upgrade your code.\n" +image: "https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png" +parent: "MadelineProto API" + +--- +# `danog\MadelineProto\RPCError\ChannelInvalidError` +[Back to index](../../../index.html) + +> Author: Daniil Gentili + + +The provided channel is invalid. + + +Note: this exception is part of the raw API, and thus is not covered by the backwards-compatibility promise. + +Always check the changelog when upgrading, and use tools like Psalm to easily upgrade your code. + + +## Properties +* `$rpc`: `string` RPC error. +* `$description`: `string` Human-readable description of RPC error. +* `$tlTrace`: `string` TL trace. + +## Method list: +* [`getLocalization(): string`](#getLocalization) +* [`getMessage(): string`](#getMessage) +* [`getCode()`](#getCode) +* [`getFile(): string`](#getFile) +* [`getLine(): int`](#getLine) +* [`getTrace(): array`](#getTrace) +* [`getPrevious(): ?Throwable`](#getPrevious) +* [`getTraceAsString(): string`](#getTraceAsString) +* [`getTLTrace(): string`](#getTLTrace) + +## Methods: +### `getLocalization(): string` + +Get localized error name. + + + +### `getMessage(): string` + + + + + +### `getCode()` + + + + + +### `getFile(): string` + + + + + +### `getLine(): int` + + + + + +### `getTrace(): array` + + + + + +### `getPrevious(): ?Throwable` + + + + +#### See also: +* `Throwable` + + + + +### `getTraceAsString(): string` + + + + + +### `getTLTrace(): string` + +Get TL trace. + + + +--- +Generated by [danog/phpdoc](https://phpdoc.daniil.it) diff --git a/docs/PHP/index.md b/docs/PHP/index.md index 3bab36d713..2323e22b8b 100644 --- a/docs/PHP/index.md +++ b/docs/PHP/index.md @@ -342,6 +342,7 @@ Async PHP client API for the telegram MTProto protocol. * [\danog\MadelineProto\RPCError\ButtonUserPrivacyRestrictedError: The privacy setting of the user specified in a [inputKeyboardButtonUserProfile](/constructor/inputKeyboardButtonUserProfile) button do not allow creating such a button.](/PHP/danog/MadelineProto/RPCError/ButtonUserPrivacyRestrictedError.html) * [\danog\MadelineProto\RPCError\CallAlreadyAcceptedError: The call was already accepted.](/PHP/danog/MadelineProto/RPCError/CallAlreadyAcceptedError.html) * [\danog\MadelineProto\RPCError\CallAlreadyDeclinedError: The call was already declined.](/PHP/danog/MadelineProto/RPCError/CallAlreadyDeclinedError.html) +* [\danog\MadelineProto\RPCError\ChannelInvalidError: The provided channel is invalid.](/PHP/danog/MadelineProto/RPCError/ChannelInvalidError.html) * [\danog\MadelineProto\RPCError\ChannelPrivateError: You haven't joined this channel/supergroup.](/PHP/danog/MadelineProto/RPCError/ChannelPrivateError.html) * [\danog\MadelineProto\RPCError\ChatAdminRequiredError: You must be an admin in this chat to do this.](/PHP/danog/MadelineProto/RPCError/ChatAdminRequiredError.html) * [\danog\MadelineProto\RPCError\ChatForbiddenError: This chat is not available to the current user.](/PHP/danog/MadelineProto/RPCError/ChatForbiddenError.html) diff --git a/docs/docs/DOCKER.md b/docs/docs/DOCKER.md index bfd3aff792..3ca8703cdd 100644 --- a/docs/docs/DOCKER.md +++ b/docs/docs/DOCKER.md @@ -32,6 +32,15 @@ echo 262144 | sudo tee /proc/sys/vm/max_map_count echo vm.max_map_count=262144 | sudo tee /etc/sysctl.d/40-madelineproto.conf ``` +Then, increase the maximum open FD limit, to allow opening many TCP sockets for improved upload and download performance and avoid errors. + +```php +sudo mkdir -p /etc/security/limits.d/ + +echo '* soft nofile 1048576' | sudo tee -a /etc/security/limits.d/40-madelineproto.conf +echo '* hard nofile 1048576' | sudo tee -a /etc/security/limits.d/40-madelineproto.conf +``` + Finally, follow one or more of the following guides, according to your needs: ### CLI bot (recommended) diff --git a/docs/docs/REQUIREMENTS.md b/docs/docs/REQUIREMENTS.md index 366b91f079..5454b7dfeb 100644 --- a/docs/docs/REQUIREMENTS.md +++ b/docs/docs/REQUIREMENTS.md @@ -44,6 +44,11 @@ echo ffi.enable=1 | sudo tee $(php --ini | sed '/additional .ini/!d;s/.*: //g')/ echo 262144 | sudo tee /proc/sys/vm/max_map_count echo vm.max_map_count=262144 | sudo tee /etc/sysctl.d/40-madelineproto.conf +sudo mkdir -p /etc/security/limits.d/ + +echo '* soft nofile 1048576' | sudo tee -a /etc/security/limits.d/40-madelineproto.conf +echo '* hard nofile 1048576' | sudo tee -a /etc/security/limits.d/40-madelineproto.conf + cd /tmp sudo apt-get install build-essential git clone https://github.com/danog/PrimeModule-ext @@ -51,6 +56,6 @@ cd PrimeModule-ext && make -j$(nproc) && sudo make install ``` -The `max_map_count` sysctl configuration is required to avoid "Fiber stack allocate failed" and "Fiber stack protect failed" errors, since the PHP engine mmaps two memory regions per fiber. +The `max_map_count` sysctl configuration is required to avoid "Fiber stack allocate failed" and "Fiber stack protect failed" errors, since the PHP engine mmaps two memory regions per fiber, and the `soft/hard nofile` limits increase the maximum open FD limit, to allow opening many TCP sockets for improved upload and download performance, and to avoid errors. Next section \ No newline at end of file