From owner-freebsd-ports@freebsd.org Sat Jun 11 17:52:11 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4A0BAF0504 for ; Sat, 11 Jun 2016 17:52:11 +0000 (UTC) (envelope-from abi@abinet.ru) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id B1DB02296 for ; Sat, 11 Jun 2016 17:52:11 +0000 (UTC) (envelope-from abi@abinet.ru) Received: by mailman.ysv.freebsd.org (Postfix) id B12BFAF0503; Sat, 11 Jun 2016 17:52:11 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0D05AF0502 for ; Sat, 11 Jun 2016 17:52:11 +0000 (UTC) (envelope-from abi@abinet.ru) Received: from mail.abinet.ru (mail.abinet.ru [136.243.72.227]) by mx1.freebsd.org (Postfix) with ESMTP id 797932295 for ; Sat, 11 Jun 2016 17:52:10 +0000 (UTC) (envelope-from abi@abinet.ru) Received: from [10.0.1.1] (unknown [10.0.1.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.abinet.ru (Postfix) with ESMTPSA id 1EE1E1F21 for ; Sat, 11 Jun 2016 17:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=abinet.ru; s=dkim; t=1465667528; bh=cUAjLaOqhtBanQmDsrDjIp23pybrK1m7uK8AsyxmzYA=; h=Date:From:To:Subject:References:In-Reply-To; b=iISVWp8yfoqhXCsuzHs5+OPsLFy3HTQ18dfdH4+W0zmXeI9ev+77couzptWIs1Cod 2zC05yVx3sTK0k5ru9dHwq5sUwUDNDfv9CrwezkbdYIX8b8v4kPS/x225r0p+83A+W jhGmO5M9Yy0faDacPlxwToliLQH77CAWUFlNoWD0= Message-ID: <575C4FEB.3030801@abinet.ru> Date: Sat, 11 Jun 2016 20:52:43 +0300 From: abi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:25.8) Gecko/20151117 FossaMail/25.1.9 MIME-Version: 1.0 To: ports@freebsd.org Subject: Re: wait for mysql availability References: <575BEC94.70209@abinet.ru> <11C24D0E7B6E9F7E2D80B5C3@atuin.in.mat.cc> <20A7440D-80E1-4E2A-BAC4-713DC97CB949@grem.de> In-Reply-To: <20A7440D-80E1-4E2A-BAC4-713DC97CB949@grem.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2016 17:52:11 -0000 Yep, that's innodb. It can warm up less than a second, but it's enough sometimes. Actually, from my point of view, mysql loader should return control after it's properly initialized. I doubt every port maintainer must invent their own bicycle if port depends on mysql. On 11.06.2016 19:40, Michael Gmelin wrote: > >> On 11 Jun 2016, at 08:11, Mathieu Arnold wrote: >> >> >> >> +--On 11 juin 2016 13:48:52 +0300 abi wrote: >> | Hello, >> | >> | I have a daemon depended on mysql database, however >> | REQUIRE: mysql >> | is not enough as mysql databases are not available immediately after >> | mysql start, so my daemon fails to start. >> | >> | Are there any way to check mysql availability that would by mysql setup >> | agnostic? >> | >> | I have 2 ideas: use sleep() or standalone script using application >> | credentials in prestart. >> >> The mysql server should be ready to use after its rc script returns, you >> should open a PR with mysql for this to be fixed. >> >> > There's a difference between starting MySQL and it becoming available to clients, e.g. when innodb is recovering from a crash, which can take a long time and is not necessarily something you want to wait for on boot. > > - m > >