<p dir="ltr">Then what should be a good number of acceptors and max_connections? depending on hardware? Can have 1 acceptor and thousands of max_connections? Is it only max_connections that determines the concurrency?</p>
<div class="gmail_quote">On 5 Jul 2013 23:26, "Loïc Hoguin" <<a href="mailto:essen@ninenines.eu">essen@ninenines.eu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 07/05/2013 03:34 PM, Barco You wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thank you all.<br>
<br>
Whats the maximum connections can it bear when add a pool? If I use<br>
Cowboy to provide a REST API for data query and I start up the http<br>
listener with 10000 acceptors and 10000 emysql connections, does that<br>
mean i can support 10000 concurrency?<br>
</blockquote>
<br>
Not answering your question.<br>
<br>
Acceptors aren't the maximum number of connections, it's the processes doing the actual accept. They're only configurable to allow tweaking performance, and with 10000 you will accept slower, that's too much. The setting you probably meant is max_connections.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 5 Jul 2013 14:35, "Mike Oxford" <<a href="mailto:moxford@gmail.com" target="_blank">moxford@gmail.com</a><br>
<mailto:<a href="mailto:moxford@gmail.com" target="_blank">moxford@gmail.com</a>>> wrote:<br>
<br>
emysql_util also has some other methods ... as_record/1,<br>
as_proplist/1, as_dict/1<br>
Those will clean up the raw output into something far more<br>
usable/accessible.<br>
<br>
-mox<br>
<br>
On Thu, Jul 4, 2013 at 2:12 AM, Barco You <<a href="mailto:barcojie@gmail.com" target="_blank">barcojie@gmail.com</a><br>
<mailto:<a href="mailto:barcojie@gmail.com" target="_blank">barcojie@gmail.com</a>>> wrote:<br>
<br>
Where can I find the detailed description about the fields for<br>
result_packet?<br>
<br>
The result_pakcet looks like {result_packet, Number, List1,<br>
List2, <<>>}, and seemingly only List2 is meaningful. Why is<br>
there Number, List1 and <<>> ?<br>
<br>
<br>
On Thu, Jul 4, 2013 at 4:37 PM, Barco You <<a href="mailto:barcojie@gmail.com" target="_blank">barcojie@gmail.com</a><br>
<mailto:<a href="mailto:barcojie@gmail.com" target="_blank">barcojie@gmail.com</a>>> wrote:<br>
<br>
What is this part as following for?<br>
<br>
[{field,2,<<"def">>,<<"<u></u>fangchan">>,<<"user">>,<<"<u></u>user">>,<br>
<br>
<<"userid">>,<<"userid">>,8,<<<u></u>>>,63,20,16899,0},<br>
<br>
{field,3,<<"def">>,<<"<u></u>fangchan">>,<<"user">>,<<"<u></u>user">>,<br>
<br>
<<"name">>,<<"name">>,254,<<>><u></u>,33,36,20489,0},<br>
<br>
{field,4,<<"def">>,<<"<u></u>fangchan">>,<<"user">>,<<"<u></u>user">>,<br>
<br>
<<"id_no">>,<<"id_no">>,254,<<<u></u>>>,33,54,20481,0},<br>
<br>
{field,5,<<"def">>,<<"<u></u>fangchan">>,<<"user">>,<<"<u></u>user">>,<br>
<<"sex">>,<<"sex">>,1,<<>>,63,<u></u>1,0,0},<br>
<br>
{field,6,<<"def">>,<<"<u></u>fangchan">>,<<"user">>,<<"<u></u>user">>,<br>
<<"age">>,<<"age">>,2,<<>>,63,<u></u>6,0,0},<br>
<br>
{field,7,<<"def">>,<<"<u></u>fangchan">>,<<"user">>,<<"<u></u>user">>,<br>
<<"tel">>,<<"tel">>,254,<<>>,<u></u>33,33,0,0},<br>
<br>
{field,8,<<"def">>,<<"<u></u>fangchan">>,<<"user">>,<<"<u></u>user">>,<br>
<br>
<<"email">>,<<"email">>,253,<<<u></u>>>,33,132,0,0}],<br>
<br>
<br>
On Thu, Jul 4, 2013 at 4:35 PM, Barco You<br>
<<a href="mailto:barcojie@gmail.com" target="_blank">barcojie@gmail.com</a> <mailto:<a href="mailto:barcojie@gmail.com" target="_blank">barcojie@gmail.com</a>>> wrote:<br>
<br>
Solved, the bind-address of mhysql should be changed to<br>
0.0.0.0<br>
<br>
But the result packet of emysql:execute looks very<br>
verbose and fuzzy. How can I get only the clean field<br>
value or a row, like {field, value} ?<br>
<br>
emysql:execute(db_pool, <<"select * from user where tel<br>
= 13761975289">>).<br>
{result_packet,11,<br>
<br>
[{field,2,<<"def">>,<<"<u></u>fangchan">>,<<"user">>,<<"<u></u>user">>,<br>
<br>
<<"userid">>,<<"userid">>,8,<<<u></u>>>,63,20,16899,0},<br>
<br>
{field,3,<<"def">>,<<"<u></u>fangchan">>,<<"user">>,<<"<u></u>user">>,<br>
<br>
<<"name">>,<<"name">>,254,<<>><u></u>,33,36,20489,0},<br>
<br>
{field,4,<<"def">>,<<"<u></u>fangchan">>,<<"user">>,<<"<u></u>user">>,<br>
<br>
<<"id_no">>,<<"id_no">>,254,<<<u></u>>>,33,54,20481,0},<br>
<br>
{field,5,<<"def">>,<<"<u></u>fangchan">>,<<"user">>,<<"<u></u>user">>,<br>
<br>
<<"sex">>,<<"sex">>,1,<<>>,63,<u></u>1,0,0},<br>
<br>
{field,6,<<"def">>,<<"<u></u>fangchan">>,<<"user">>,<<"<u></u>user">>,<br>
<br>
<<"age">>,<<"age">>,2,<<>>,63,<u></u>6,0,0},<br>
<br>
{field,7,<<"def">>,<<"<u></u>fangchan">>,<<"user">>,<<"<u></u>user">>,<br>
<br>
<<"tel">>,<<"tel">>,254,<<>>,<u></u>33,33,0,0},<br>
<br>
{field,8,<<"def">>,<<"<u></u>fangchan">>,<<"user">>,<<"<u></u>user">>,<br>
<br>
<<"email">>,<<"email">>,253,<<<u></u>>>,33,132,0,0}],<br>
[[1,<br>
<<231,138,185,230,157,176>>,<br>
<br>
<<"237689098736789870">>,1,32,<u></u><<"13761975289">>,<br>
<<"<a href="mailto:you.jie@bestv.com.cn" target="_blank">you.jie@bestv.com.cn</a><br>
<mailto:<a href="mailto:you.jie@bestv.com.cn" target="_blank">you.jie@bestv.com.cn</a>>"<u></u>>>]],<br>
<<>>}<br>
<br>
<br>
<br>
On Thu, Jul 4, 2013 at 4:21 PM, Max Lapshin<br>
<<a href="mailto:max.lapshin@gmail.com" target="_blank">max.lapshin@gmail.com</a> <mailto:<a href="mailto:max.lapshin@gmail.com" target="_blank">max.lapshin@gmail.com</a>><u></u>><br>
wrote:<br>
<br>
Barco, it means that you need to read manual for<br>
mysql server and<br>
enable socket listener.<br>
<br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a> <mailto:<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@<u></u>erlang.org</a>><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
<br>
</blockquote>
<br>
<br>
-- <br>
Loďc Hoguin<br>
Erlang Cowboy<br>
Nine Nines<br>
<a href="http://ninenines.eu" target="_blank">http://ninenines.eu</a><br>
</blockquote></div>