Alex wrote:
>> I can only guess at your problem because you never explained the
>> nature of these "errors". Since the problem is identical with
>> different DBI components, I'm guessing that you've reached a shell or
>> system limit on the amount of resources you're allowed to consume.
>>
>> Talk to your system administrator about your system's resource limits.
>
>
>
> Yes, Postgres max_connections=200, I just need to make about 180 DBI
> sessions and use it.
>
> As I said before, I use Randal Schwartz`s script
> (http://www.stonehenge.com/merlyn/LinuxMag/col41.listing.txt). I`ve
> added DBI package to save all extracted links to DBI.
>
> Each time when I add a query to DBI I create new session and then there
> are more than 197 sessions there are errors...
>
You start out by creating 298 sessions? j=1 less than 3, is two
iterations, two times i=1 less than or equal to 150 is 298? This happens
before you even start the kernel...
Why the double loop anyways?
for my $i (0..195) {
...
}
>
> Code below:
> ________________________
>
> ...
> use constant LADBI => "ladbi";
> POE::Component::LaDBI->create( Alias => LADBI );
> my $r;
> for(my $j=1;$j<3;$j++)
> {
> for(my $i=1;$i<=150;$i++)
> {
> POE::Component::My::DBI->spawn(SQL => $SQL,EVENT => "insert");
> print "$j : $i\n";
> }
> sleep 1;
> }
> $poe_kernel->run;
> exit 0;
>
[snip]
http://danconia.org