{"id":17976082,"url":"https://github.com/deemru/php-cgi-spawner","last_synced_at":"2025-07-31T00:03:52.448Z","repository":{"id":36351992,"uuid":"40656763","full_name":"deemru/php-cgi-spawner","owner":"deemru","description":"Spawns php-cgi processes","archived":false,"fork":false,"pushed_at":"2017-11-05T11:53:06.000Z","size":47,"stargazers_count":155,"open_issues_count":0,"forks_count":28,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-06T05:14:59.901Z","etag":null,"topics":["php","php-cgi","php-cgi-spawner","php-fpm","windows"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deemru.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-13T12:08:11.000Z","updated_at":"2024-12-03T06:55:43.000Z","dependencies_parsed_at":"2022-09-01T03:21:39.031Z","dependency_job_id":null,"html_url":"https://github.com/deemru/php-cgi-spawner","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/deemru/php-cgi-spawner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deemru%2Fphp-cgi-spawner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deemru%2Fphp-cgi-spawner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deemru%2Fphp-cgi-spawner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deemru%2Fphp-cgi-spawner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deemru","download_url":"https://codeload.github.com/deemru/php-cgi-spawner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deemru%2Fphp-cgi-spawner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267961995,"owners_count":24172543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","php-cgi","php-cgi-spawner","php-fpm","windows"],"created_at":"2024-10-29T17:21:56.050Z","updated_at":"2025-07-31T00:03:52.427Z","avatar_url":"https://github.com/deemru.png","language":"C","readme":"# php-cgi-spawner\n[![Build status](https://ci.appveyor.com/api/projects/status/6f2rqvltmp9ax4nd?svg=true)](https://ci.appveyor.com/project/deemru/php-cgi-spawner)\n\n[php-cgi-spawner](https://github.com/deemru/php-cgi-spawner) is the smallest and easiest application to spawn a multiple `php-cgi` processes in Windows for your web server with FastCGI.\n\n- It spawns as many `php-cgi` (x86 or x64) on a single port as you need\n- It automatically restarts them if they crashed or reached `PHP_FCGI_MAX_REQUESTS`\n\n## Basic Usage\n\nIf you have the following directory structure:\n\n```\nphp-cgi-spawner.exe\nphp\n  php-cgi.exe\n  php.ini\n```\n\nIn order to spawn 4 `php-cgi` on tcp/9000:\n\n```\nphp-cgi-spawner.exe php/php-cgi.exe 9000 4\n```\n\nYou may specify a config file explicitly:\n\n```\nphp-cgi-spawner.exe \"php/php-cgi.exe -c php/php.ini\" 9000 4\n```\n\n`php-cgi.exe` processes are spawned under the same user that runs `php-cgi-spawner.exe`.\n\n## Version 1.1\n\nNow you can additionally specify a number of `php-cgi` helpers for permanently running `php-cgi` processes:\n\n```\nphp-cgi-spawner.exe \"php/php-cgi.exe -c php/php.ini\" 9000 4+16\n```\n\nIt means that up to 16 `php-cgi` helpers can start automatically when 4 `php-cgi` permanents do not handle a temporary server high load.\n\n`PHP_FCGI_MAX_REQUESTS` for `php-cgi` helpers can be set in `PHP_HELP_MAX_REQUESTS`:\n\n```\nset PHP_HELP_MAX_REQUESTS=100\nphp-cgi-spawner.exe \"php/php-cgi.exe -c php/php.ini\" 9000 4+16\n```\n\nYou can even do not use permanently running `php-cgi` and use just helpers, even with 1 request per helper:\n\n```\nset PHP_HELP_MAX_REQUESTS=1\nphp-cgi-spawner.exe \"php/php-cgi.exe -c php/php.ini\" 9000 0+16\n```\n\nBut it is recommended to run at least 1 permanent `php-cgi` to handle opcache.\n\n## Download\n\nGo to [release](https://github.com/deemru/php-cgi-spawner/releases/latest) to download pre-built binary.\n\n## Build\n\nGo to [src](src) directory and run [make.bat](src/make.bat) in a Visual Studio environment.\n\n## Notes\n\n- Currently a maximum number of permanently running `php-cgi` processes is 64 because of `MAXIMUM_WAIT_OBJECTS` in `WaitForMultipleObjects`.\n- The number of `php-cgi` helpers does not have such limit.\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeemru%2Fphp-cgi-spawner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeemru%2Fphp-cgi-spawner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeemru%2Fphp-cgi-spawner/lists"}