diff --git a/docs/source/faq/index.rst b/docs/source/faq/index.rst index e5bef2be..3d4a0036 100644 --- a/docs/source/faq/index.rst +++ b/docs/source/faq/index.rst @@ -19,7 +19,7 @@ This FAQ page provides answers to common questions about Pyrogram and, to some e - :doc:`uploading-with-urls-gives-error-webpage-curl-failed` - :doc:`sqlite3-operationalerror-database-is-locked` - :doc:`sqlite3-interfaceerror-error-binding-parameter` -- :doc:`socket-send-raised-exception-oserror-timeouterror` +- :doc:`socket-send-oserror-timeouterror-connection-lost-reset` - :doc:`how-to-avoid-flood-waits` - :doc:`the-account-has-been-limited-deactivated` @@ -40,6 +40,6 @@ This FAQ page provides answers to common questions about Pyrogram and, to some e uploading-with-urls-gives-error-webpage-curl-failed sqlite3-operationalerror-database-is-locked sqlite3-interfaceerror-error-binding-parameter - socket-send-raised-exception-oserror-timeouterror + socket-send-oserror-timeouterror-connection-lost-reset how-to-avoid-flood-waits the-account-has-been-limited-deactivated \ No newline at end of file diff --git a/docs/source/faq/socket-send-oserror-timeouterror-connection-lost-reset.rst b/docs/source/faq/socket-send-oserror-timeouterror-connection-lost-reset.rst new file mode 100644 index 00000000..85c50650 --- /dev/null +++ b/docs/source/faq/socket-send-oserror-timeouterror-connection-lost-reset.rst @@ -0,0 +1,12 @@ +socket.send(), OSError(), TimeoutError(), Connection lost/reset +=============================================================== + +If you get any of these errors chances are you ended up with a slow or inconsistent network connection. +Another reason could be because you are blocking the event loop for too long. + +You can consider the following: + +- Use Pyrogram asynchronously in its intended way. +- Use shorter non-asynchronous processing loops. +- Use ``asyncio.sleep()`` instead of ``time.sleep()``. +- Use a stable network connection. diff --git a/docs/source/faq/socket-send-raised-exception-oserror-timeouterror.rst b/docs/source/faq/socket-send-raised-exception-oserror-timeouterror.rst deleted file mode 100644 index 4d9aa89d..00000000 --- a/docs/source/faq/socket-send-raised-exception-oserror-timeouterror.rst +++ /dev/null @@ -1,13 +0,0 @@ -socket.send() raised exception, OSError(), TimeoutError() -========================================================= - -If you get this error chances are you or Telegram ended up with a slow or inconsistent network connection, which -triggers internal timeouts due to data not being sent/received in time. Another reason could be because you are blocking -the event loop for too long, most likely due to an improper use of non-asynchronous or threaded operations which may -lead to blocking code that prevents the event loop from running properly. - -You can consider the following: - -- Use Pyrogram asynchronously in its intended way. -- Use shorter non-asynchronous processing loops. -- Use ``asyncio.sleep()`` instead of ``time.sleep()``.