{"id":55407,"date":"2020-01-20T00:00:00","date_gmt":"2020-01-19T21:00:00","guid":{"rendered":"https:\/\/prohoster.info\/blog\/blog_prohoster\/nginx-kak-pobedit-response_status-0"},"modified":"2020-02-18T14:03:31","modified_gmt":"2020-02-18T11:03:31","slug":"nginx-kak-pobedit-response_status-0","status":"publish","type":"post","link":"https:\/\/prohoster.info\/ro\/blog\/administrirovanie\/nginx-kak-pobedit-response_status-0","title":{"rendered":"[Nginx] \u041a\u0430\u043a \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u044c response_status = 0","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Articol din categoria \u201enote de margine\u201d.<\/p>\n<p><b class=\"spoiler_title\">TL:DR:<\/b><\/p>\n<pre><code class=\"nginx\">http2_max_field_size 8k; # te va salva!<\/code><\/pre>\n<p>Pe unul dintre proiecte, dup\u0103 ce am schimbat o parte din logica intern\u0103 a backend-ului, am \u00eenceput s\u0103 observ un cod de r\u0103spuns ciudat \u00een loguri, \u0219i anume \u2014 0. \u00cen loguri arat\u0103 aproximativ a\u0219a:<\/p>\n<pre><code class=\"json\">{\n  \"timestamp\": \"2020-01-17T08:41:51+00:00\",\n  \"remote_addr\": \"zzz.zzz.zzz.zzz\",\n  \"request_time\": 0,\n  \"upstream_response_time\": \"\",\n  \"upstream_header_time\": \"\",\n  \"http_accept_language\": \"-language\",\n  \"response_status\": 0,\n  \"request\": \"\",\n  \"host\": \"example.com\",\n  \"upstream_addr\": \"\",\n  \"http_referrer\": \"\",\n  \"request_length\": 5854,\n  \"bytes_sent\": 0,\n  \"http_user_agent\": \"\"\n}\n<\/code><\/pre>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\nCitirea documenta\u021biei \u0219i c\u0103utarea pe Google despre acest subiect nu a adus nimic \u2014 se afirm\u0103 c\u0103 un astfel de comportament apare atunci c\u00e2nd clientul a \u00eenchis conexiunea f\u0103r\u0103 a transmite anteturile. De asemenea, au fost diverse excentricit\u0103\u021bi cu dimensiunea buffer-ului pentru wsgi_, ceea ce \u00een cazul nostru nu se potrivea deloc.<\/p>\n<p>\u00cen general, am decis c\u0103 problema nu este o problem\u0103, av\u00e2nd \u00een vedere c\u0103 pentru volumele noastre, nu este critic\u0103.<\/p>\n<p>Exact p\u00e2n\u0103 la momentul \u00een care am fost provocat de urm\u0103toarea problem\u0103: \u00een unele cazuri, linkurile se deschid f\u0103r\u0103 probleme pe http, dar refuz\u0103 complet s\u0103 func\u021bioneze pe https, oferind o minunat\u0103: Connection #0 to host example.com left intact<br \/>\ncurl: (52) R\u0103spuns gol de la server<\/p>\n<p>\u00cen loguri, am reu\u0219it s\u0103 urm\u0103resc aceast\u0103 problem\u0103 doar dup\u0103 IP \u2014 niciun request, nici alte date, a\u0219a cum se vede din exemplul de mai sus \u2014 nu exist\u0103. Doar binecunoscutul status 0, dar eu \u0219tiu c\u0103 nu am \u00eentrerupt cererea! Am \u00eenceput s\u0103 cercetez ce ar putea merge prost. \u0218i totul s-a dovedit a fi foarte simplu:<\/p>\n<p><i>listen 443 <a class=\"wpil_keyword_link\" href=\"https:\/\/prohoster.info\/ro\/ssl-sertifikat\/\"   title=\"ssl\" data-wpil-keyword-link=\"linked\"  data-wpil-monitor-id=\"2274\">ssl<\/a> <b>http2<\/b> backlog=8192;<\/i><\/p>\n<p>A\u0219adar, dac\u0103 folose\u0219ti http2 pentru conexiuni ssl, nu este suficient s\u0103 configurezi doar buffer-ele cererii, trebuie s\u0103 le configurezi \u0219i \u00een ngx_http_v2_module, \u0219i anume:<\/p>\n<pre><code class=\"plaintext\">Sintaxa:\thttp2_max_field_size dimensiune;\nValoare implicit\u0103:\thttp2_max_field_size 4k;\nContext:\thttp, server\n<\/code><\/pre>\n<p>\n<i>Restric\u021bioneaz\u0103 dimensiunea maxim\u0103 a antetului cererii, comprimat folosind HPACK. Restric\u021bia se aplic\u0103 at\u00e2t numelui, c\u00e2t \u0219i valorii. Dac\u0103 se aplic\u0103 codificarea Huffman, dimensiunea efectiv\u0103 a \u0219irurilor despachetate ale numelui \u0219i valorii poate fi mai mare. Restric\u021bia implicit\u0103 este potrivit\u0103 pentru majoritatea cererilor.<\/i><\/p>\n<p>\u00cen general, aceasta este totul. \u0218i de ce? Pentru c\u0103 lungimea linkului era mare \u2014 mai mare dec\u00e2t cele 4k.<\/p>\n<p>Set\u00e2nd-o la, de exemplu, 8kb (sau c\u00e2t ai nevoie cu siguran\u021b\u0103) \u2014 rezolv\u0103m problema.<br \/>\nCam a\u0219a stau lucrurile.<br \/>\n<br \/>Sursa: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/484330\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0421\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u0440\u0430\u0437\u0440\u044f\u0434\u0430 \u00ab\u0437\u0430\u043c\u0435\u0442\u043a\u0438 \u043d\u0430 \u043f\u043e\u043b\u044f\u0445\u00bb. TL:DR: http2_max_field_size 8k; # \u0432\u0441\u0435\u0445 \u0441\u043f\u0430\u0441\u0435\u0442! \u041d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u0431\u0435\u043a\u0435\u043d\u0434\u0430, \u043d\u0430\u0447\u0430\u043b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0439 response_code \u0432 \u043b\u043e\u0433\u0430\u0445, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u2014 0. \u0412 \u043b\u043e\u0433\u0430\u0445 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a: { &quot;timestamp&quot;: &quot;2020-01-17T08:41:51+00:00&quot;, &quot;remote_addr&quot;: &quot;zzz.zzz.zzz.zzz&quot;, &quot;request_time&quot;: 0, &quot;upstream_response_time&quot;: &quot;&quot;, &quot;upstream_header_time&quot;: &quot;&quot;, &quot;http_accept_language&quot;: &quot;-language&quot;, &quot;response_status&quot;: 0, &quot;request&quot;: &quot;&quot;, &quot;host&quot;: [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-55407","post","type-post","status-publish","format-standard","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0421\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u0440\u0430\u0437\u0440\u044f\u0434\u0430 \u00ab\u0437\u0430\u043c\u0435\u0442\u043a\u0438 \u043d\u0430 \u043f\u043e\u043b\u044f\u0445\u00bb. TL:DR:http2_max_field_size 8k; # \u0432\u0441\u0435\u0445 \u0441\u043f\u0430\u0441\u0435\u0442! \u041d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/ro\/blog\/administrirovanie\/nginx-kak-pobedit-response_status-0\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"ro_RO\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47[Nginx] \u041a\u0430\u043a \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u044c response_status = 0 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0421\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u0440\u0430\u0437\u0440\u044f\u0434\u0430 \u00ab\u0437\u0430\u043c\u0435\u0442\u043a\u0438 \u043d\u0430 \u043f\u043e\u043b\u044f\u0445\u00bb. TL:DR:http2_max_field_size 8k; # \u0432\u0441\u0435\u0445 \u0441\u043f\u0430\u0441\u0435\u0442! \u041d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/ro\/blog\/administrirovanie\/nginx-kak-pobedit-response_status-0\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-01-19T21:00:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-02-18T11:03:31+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47[Nginx] \u041a\u0430\u043a \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u044c response_status = 0 | ProHoster","description":"Articol din categoria \u201enoti\u021be pe marginea paginii\u201d. TL:DR:http2_max_field_size 8k; # to\u021bi vor fi salva\u021bi! \u00centr-unul dintre proiecte, dup\u0103 modificarea unor lucruri.","canonical_url":"https:\/\/prohoster.info\/ro\/blog\/administrirovanie\/nginx-kak-pobedit-response_status-0","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"ro_RO","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47[Nginx] \u041a\u0430\u043a \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u044c response_status = 0 | ProHoster","og:description":"\u0421\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u0440\u0430\u0437\u0440\u044f\u0434\u0430 \u00ab\u0437\u0430\u043c\u0435\u0442\u043a\u0438 \u043d\u0430 \u043f\u043e\u043b\u044f\u0445\u00bb. TL:DR:http2_max_field_size 8k; # \u0432\u0441\u0435\u0445 \u0441\u043f\u0430\u0441\u0435\u0442! \u041d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439.","og:url":"https:\/\/prohoster.info\/ro\/blog\/administrirovanie\/nginx-kak-pobedit-response_status-0","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-01-19T21:00:00+00:00","article:modified_time":"2020-02-18T11:03:31+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"55407","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 19:44:26","updated":"2026-02-09 17:28:53","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/posts\/55407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/comments?post=55407"}],"version-history":[{"count":1,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/posts\/55407\/revisions"}],"predecessor-version":[{"id":159518,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/posts\/55407\/revisions\/159518"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/media?parent=55407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/categories?post=55407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/tags?post=55407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}