server_restart_browser
Server Restart Browser
Restart the HTTP server and browser via s6-overlay process supervisor. This performs a clean restart of the entire service, ensuring both the HTTP server and browser processes are fully restarted. Useful for recovering from browser hangs, memory issues, or applying configuration changes. All active browser contexts will be terminated. The restart is non-blocking - the response is sent before the restart occurs (~1 second delay). In Docker containers, uses s6-svc for graceful restart. Falls back to browser-only restart in non-Docker environments.
Usage Example
1234567891011
import asyncio
from owl_browser import OwlBrowser, RemoteConfig
# Async usage
async with OwlBrowser(config) as browser:
context = await browser.create_context()
context_id = context["context_id"]
await browser.server_restart_browser(
)
Parameters
Optional
forcebooleanForce restart even if browser appears healthy. Default: false
Response
Returns a JSON object with the operation result.
{
"success": true,
"result": <value>
}