inaka / worker_pool

Erlang worker pool
https://hex.pm/packages/worker_pool
Apache License 2.0
276 stars 80 forks source link

Does it really work if simple_one_for_one is used for the supervisor over the individual workers? #104

Closed simonxuhao closed 7 years ago

simonxuhao commented 7 years ago
WorkerSpecs =
    [ { wpool_pool:worker_name(Name, I)
      , { WorkerType
        , start_link
        , [wpool_pool:worker_name(Name, I), Worker, InitArgs, Options]
        }
      , permanent
      , 5000
      , worker
      , [Worker]
      } || I <- lists:seq(1, Workers)],
  {ok, {Strategy, WorkerSpecs}}.

But supervisor documentation says "Notice that when the restart strategy is simple_one_for_one, the list of child specifications must be a list with one child specification only".

If simple_one_for_one really works, do I have to start all the workers by start_child/2?

elbrujohalcon commented 7 years ago

I'm pretty sure simple_one_for_one will not work, but if you give it a try let us all know :P

simonxuhao commented 7 years ago

Had to chance to try it. It failed in a funny way:

{"Kernel pid terminated",application_controller,"{application_start_failure,jtapp,{bad_return,{{jtapp_app,start,[normal,[]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,jtapp_jtparser_pool,{shutdown,{failed_to_start_child,'wpool_pool-jtapp_jtparser_pool-process-sup',{bad_start_spec,[{'wpool_pool-jtapp_jtparser_pool-1',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-1',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-2',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-2',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-3',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-3',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-4',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-4',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-5',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-5',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-6',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-6',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-7',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-7',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-8',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-8',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-9',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-9',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-10',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-10',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-11',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-11',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-12',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-12',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-13',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-13',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-14',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-14',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-15',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-15',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-16',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-16',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-17',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-17',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-18',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-18',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-19',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-19',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-20',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-20',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-21',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-21',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-22',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-22',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-23',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-23',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-24',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-24',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-25',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-25',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-26',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-26',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-27',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-27',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-28',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-28',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-29',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-29',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-30',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-30',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-31',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-31',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-32',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-32',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-33',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-33',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-34',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-34',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-35',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-35',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-36',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-36',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-37',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-37',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-38',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-38',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-39',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-39',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-40',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-40',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-41',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-41',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-42',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-42',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-43',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-43',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-44',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-44',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-45',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-45',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-46',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-46',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-47',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-47',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-48',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-48',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-49',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-49',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]},{'wpool_pool-jtapp_jtparser_pool-50',{wpool_process,start_link,['wpool_pool-jtapp_jtparser_pool-50',jtapp_jtparser,\"foobar\",[{queue_manager,'wpool_pool-jtapp_jtparser_pool-queue-manager'},{time_checker,'wpool_pool-jtapp_jtparser_pool-time-checker'},{workers,50},{worker_type,gen_server},{worker,{jtapp_jtparser,\"foobar\"}},{strategy,{simple_one_for_one,5,60}},{overrun_warning,infinity},{overrun_handler,{error_logger,warning_report}},{workers,100},{worker_opt,[]}]]},permanent,5000,worker,[jtapp_jtparser]}]}}}}}}},[{jtapp_app,start,2,[{file,\"src/jtapp_app.erl\"},{line,110}]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,273}]}]}}}}}"} Kernel pid terminated (application_controller) ({application_start_failure,jtapp,{bad_return,{{jtapp_app,start,[normal,[]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,jtapp_jtparser_po heart: Fri Jun 2 03:17:03 2017: Erlang is crashing .. (waiting for crash dump file) heart: Fri Jun 2 03:17:04 2017: Executed "/home/nestor/devel/jtapp/_rel/jtapp_release/bin/jtapp_release start" -> 0. Terminating.

simonxuhao commented 7 years ago

Any particular reason simple_one_for_one is not supported?

elbrujohalcon commented 7 years ago

Well, simple_one_for_one is meant to be used when your children should be started/stopped dynamically. wpool, on the other hand, assumes that the workers in each pool will be fixed from the start.