RE: Can't use sendmail more than once

2003-05-30 Thread Marc M. Adkins
 I have migrated my site from IIS and Active State to Apache 1.3
 and mod_perl
 on a Windows machine. I use the site to send emails to registered users
 using Mail::sendmail through our SMTP server (another machine).

 With Apache I can only send emails once after I start the Apache server,
 thereafter it tells me it can't connect to the SMTP server. Restarting the
 Apache server leads to again being able to only send emails once.

I've been having similar problems using Mail::Sendmail 0.79 w/Apache 2.0.45
and mod_perl 1.99.10_dev on Windows.  It works for a while (generally more
than once) and then it can't connect.  I haven't tracked it down yet.

mma



Re: Can't use sendmail more than once

2003-05-29 Thread Randy Kobes
On Thu, 29 May 2003, Greg Dutkowski wrote:

 I have migrated my site from IIS and Active State to Apache 1.3
 and mod_perl on a Windows machine. I use the site to send
 emails to registered users using Mail::sendmail through our
 SMTP server (another machine).
 
 With Apache I can only send emails once after I start the
 Apache server, thereafter it tells me it can't connect to the
 SMTP server. Restarting the Apache server leads to again being
 able to only send emails once.
 
 Any ideas?

After it sends the mail, can you tell if the connection to the
smtp server is still open? If so, can you explicitly disconnect
from your script? Also, is this a script (or handler) run under
mod_perl? If so, does this occur only under mod_perl, or does the
same thing occur when mod_perl is disabled and an ordinary cgi
script is used? If it is run under mod_perl, are all further
server connections blocked after the first mail is sent, or is it
just the smtp connection that's blocked?

-- 
best regards,
randy kobes



Re: Can't use sendmail more than once

2003-05-29 Thread Perrin Harkins
On Wed, 2003-05-28 at 22:45, Greg Dutkowski wrote:
 I have migrated my site from IIS and Active State to Apache 1.3 and mod_perl
 on a Windows machine. I use the site to send emails to registered users
 using Mail::sendmail through our SMTP server (another machine).
 
 With Apache I can only send emails once after I start the Apache server,
 thereafter it tells me it can't connect to the SMTP server. Restarting the
 Apache server leads to again being able to only send emails once.
 
 Any ideas?

This is a known problem with mod_perl 1.x on Win32.  Sockets only work
when you make it single-threaded (ThreadsPerChild 1).  Doing that
doesn't make a difference in terms of your actual script performance,
since mod_perl is already single-threaded on Win32, but it will make
images slow.  One solution is to serve the images from a separate web
server.

- Perrin



Re: Can't use sendmail more than once

2003-05-29 Thread Stas Bekman
Perrin Harkins wrote:
On Wed, 2003-05-28 at 22:45, Greg Dutkowski wrote:

I have migrated my site from IIS and Active State to Apache 1.3 and mod_perl
on a Windows machine. I use the site to send emails to registered users
using Mail::sendmail through our SMTP server (another machine).
With Apache I can only send emails once after I start the Apache server,
thereafter it tells me it can't connect to the SMTP server. Restarting the
Apache server leads to again being able to only send emails once.
Any ideas?


This is a known problem with mod_perl 1.x on Win32.  Sockets only work
when you make it single-threaded (ThreadsPerChild 1).  Doing that
doesn't make a difference in terms of your actual script performance,
since mod_perl is already single-threaded on Win32, but it will make
images slow.  One solution is to serve the images from a separate web
server.
Can we add this factoid to
http://perl.apache.org/docs/1.0/guide/troubleshooting.html#Windows_OS_specific_notes
?
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: Can't use sendmail more than once

2003-05-29 Thread Perrin Harkins
On Wed, 2003-05-28 at 23:17, Stas Bekman wrote:
 Can we add this factoid to
 http://perl.apache.org/docs/1.0/guide/troubleshooting.html#Windows_OS_specific_notes
 ?

Yes.  I think Joshua Chamas has a summary of it somewhere, but I can't
seem to reach his site or the mod_perl site at the moment for some
reason.

- Perrin



RE: Can't use sendmail more than once

2003-05-29 Thread Greg Dutkowski
That's fixed it - I don't server many images - thanks very much!

-Original Message-
From: Perrin Harkins [mailto:[EMAIL PROTECTED]
Sent: Thursday, 29 May 2003 1:07 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Can't use sendmail more than once


On Wed, 2003-05-28 at 22:45, Greg Dutkowski wrote:
 I have migrated my site from IIS and Active State to Apache 1.3 and
mod_perl
 on a Windows machine. I use the site to send emails to registered users
 using Mail::sendmail through our SMTP server (another machine).

 With Apache I can only send emails once after I start the Apache server,
 thereafter it tells me it can't connect to the SMTP server. Restarting the
 Apache server leads to again being able to only send emails once.

 Any ideas?

This is a known problem with mod_perl 1.x on Win32.  Sockets only work
when you make it single-threaded (ThreadsPerChild 1).  Doing that
doesn't make a difference in terms of your actual script performance,
since mod_perl is already single-threaded on Win32, but it will make
images slow.  One solution is to serve the images from a separate web
server.

- Perrin