| 
      
      
      From: <php...@li...> - 2009-09-13 21:01:36
       | 
| My /tmp directory ran out of space (or inodes or something) today. When I went and looked, there were 350,000+ tmp files left over from the bridge, like: -rw------- 1 apache apache 0 Sep 11 20:34 .php_java_bridge7ZE0oM prw-rw-rw- 1 apache apache 0 Sep 11 20:34 .php_java_bridge7ZE0oM.i prw-rw-rw- 1 apache apache 0 Sep 11 20:34 .php_java_bridge7ZE0oM.o It actually ended up using all space on /tmp and killed my server! I see that it's the php Java.inc file that's doing this. I see that the files are created, but never where they're cleaned up. Not knowing much about how the bridge's life cycle works, I am a bit anxious to just start ramming code in there to clean up, but clearly there is a problem. Here's a graph of inode usage on my server since upgrading to the latest php-java-bridge: | 
| 
      
      
      From: <php...@li...> - 2009-09-13 21:07:19
       | 
| Oops the image got stripped. Here's a link to it: http://idisk.me.com/apinstein/Public/Pictures/Skitch/php-java-bridge_tmp_files_problem-20090913-170627.jpg Alan On Sep 13, 2009, at 5:01 PM, php-java-bridge- us...@li... wrote: > My /tmp directory ran out of space (or inodes or something) today. > > When I went and looked, there were 350,000+ tmp files left over from > the bridge, like: > > -rw------- 1 apache apache 0 Sep 11 > 20:34 .php_java_bridge7ZE0oM > prw-rw-rw- 1 apache apache 0 Sep 11 > 20:34 .php_java_bridge7ZE0oM.i > prw-rw-rw- 1 apache apache 0 Sep 11 > 20:34 .php_java_bridge7ZE0oM.o > > It actually ended up using all space on /tmp and killed my server! > > I see that it's the php Java.inc file that's doing this. I see that > the files are created, but never where they're cleaned up. > > Not knowing much about how the bridge's life cycle works, I am a bit > anxious to just start ramming code in there to clean up, but clearly > there is a problem. Here's a graph of inode usage on my server since > upgrading to the latest php-java-bridge: > > > > > You can see that the bridge exhausted all inodes on /dev/shm then as > soon as that was full it "failed-over" (by accident, based on a look > at the code) to /tmp. > > Please advise. > > Regards, > Alan > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july_______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users | 
| 
      
      
      From: <php...@li...> - 2009-09-13 21:45:28
       | 
| Hi, Yes, if your back end rejects the local fifo (in promiscuous mode), Java.inc creates a new pair and tries again in the next request. The fifos are only used on security enhanced linux, please disable them by setting JAVA_PIPE_DIR to null. Thank you very much for reporting this bug. -- It has been there since 5 years. I guess you are the first person who enabled promiscuous mode in the back end w/o setting the host value in the front end. Regards, Jost Boekemeier On Sep 13, 2009 11:07 PM, <php...@li...> wrote: Oops the image got stripped. Here's a link to it: http://idisk.me.com/apinstein/Public/Pictures/Skitch/php-java-bridge_tmp_files_problem-20090913-170627.jpg Alan On Sep 13, 2009, at 5:01 PM, php-java-bridge- us...@li... wrote: > My /tmp directory ran out of space (or inodes or something) to... > You can see that the bridge exhausted all inodes on /dev/shm then as > soon as that was full it "failed-over" (by accident, based on a look > at the code) to /tmp. > > Please advise. > > Regards, > Alan > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july_______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users | 
| 
      
      
      From: <php...@li...> - 2009-09-13 21:56:01
       | 
| I have just looked at the code, pipes are NOT used if $this->host is not 127.0.0.1. Why have you switched off the local channel in the back end if both components are running on the same machine? On Sep 13, 2009 11:45 PM, "Jost Bekemeier" <jos...@go...> wrote: Hi, Yes, if your back end rejects the local fifo (in promiscuous mode), Java.inc creates a new pair and tries again in the next request. The fifos are only used on security enhanced linux, please disable them by setting JAVA_PIPE_DIR to null. Thank you very much for reporting this bug. -- It has been there since 5 years. I guess you are the first person who enabled promiscuous mode in the back end w/o setting the host value in the front end. Regards, Jost Boekemeier > > On Sep 13, 2009 11:07 PM, <php...@li...> wrote: > > Oops the imag... us...@li... wrote: > My /tmp directory ran out of space (or inodes or something) to... > > > You can see that the bridge exhausted all inodes on /dev/shm then as > > soon as that was ful... | 
| 
      
      
      From: <php...@li...> - 2009-09-13 22:00:45
       | 
| Hi Jost-
Glad to report the bug! Sadly I seem to be good at finding them ;)
This is the *only* setup I use for getting the bridge going. If this  
either of these settings turns on promiscuous mode, I didn't do it on  
purpose.
// PHP side (duh)
define ("JAVA_HOSTS", "127.0.0.1:9676");
define ("JAVA_PREFER_VALUES", true);    # required for BC with the way  
we wrote our php-java-bridge code. Could try to debug and fix but no  
downside to this.
require_once('/Users/alanpinstein/dev/sandbox/showcase2/showcase2/ 
classes/dieselpoint/Java.inc');
// bridge side
java -server -Xmx1200m -Dphp.java.bridge.default_log_level=5 -jar / 
path/to/JavaBridge.jar SERVLET:9676 2>$LOGFILE 1>$LOGFILE &
I read the docs just now on promiscuous mode and I am not certain I  
understand what it does. I sort of see what it's used for, but it's  
not really clear exactly what it does, and consequently, what  
technically doesn't happen if it's not on.
In fact I have a nice wrapper script for starting/stopping a  
standalone bridge (which frankly I think is really convenient for  
people that aren't already running an app server). I will post the  
script in a separate email if you want to use it in the project.
Alan
On Sep 13, 2009, at 5:45 PM, php-java-bridge- 
us...@li... wrote:
> Hi,
>
> Yes, if your back end rejects the local fifo (in promiscuous mode),  
> Java.inc
> creates a new pair and tries again in the next request.
>
> The fifos are only used on security enhanced linux, please disable  
> them by
> setting JAVA_PIPE_DIR to null.
>
> Thank you very much for reporting this bug. -- It has been there  
> since 5
> years. I guess you are the first person who enabled promiscuous mode  
> in the
> back end w/o setting the host value in the front end.
>
> Regards,
> Jost Boekemeier
>
> On Sep 13, 2009 11:07 PM, <php-java-bridge- 
> us...@li...>
> wrote:
>
> Oops the image got stripped. Here's a link to it:
>
> http://idisk.me.com/apinstein/Public/Pictures/Skitch/php-java-bridge_tmp_files_problem-20090913-170627.jpg
>
> Alan
>
> On Sep 13, 2009, at 5:01 PM, php-java-bridge-
>
> us...@li... wrote: > My /tmp directory ran out of  
> space (or
> inodes or something) to...
>> You can see that the bridge exhausted all inodes on /dev/shm then as
>> soon as that was full it "failed-over" (by accident, based on a look
>> at the code) to /tmp.
>>
>> Please advise.
>>
>> Regards,
>> Alan
>>
> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and
>> focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.
> http://p.sf.net/sfu/bobj-july_______________________________________________
>> php-java-bridge-users mailing list
>> php...@li...
>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
> 30-Day
> trial. Simplify your report design, integration and deployment - and  
> focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
> 30-Day
> trial. Simplify your report design, integration and deployment - and  
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
 | 
| 
      
      
      From: <php...@li...> - 2009-09-13 22:07:01
       | 
| > r SERVLET:9676
SERVLET does set promiscuous mode. For local communication please use
SERVLET_LOCAL.
However, Java.inc should delete the fifo if the back end doesn't want to use
it, of course.
On Sep 14, 2009 12:00 AM, <php...@li...>
wrote:
Hi Jost-
Glad to report the bug! Sadly I seem to be good at finding them ;)
This is the *only* setup I use for getting the bridge going. If this
either of these settings turns on promiscuous mode, I didn't do it on
purpose.
// PHP side (duh)
define ("JAVA_HOSTS", "127.0.0.1:9676");
define ("JAVA_PREFER_VALUES", true);    # required for BC with the way
we wrote our php-java-bridge code. Could try to debug and fix but no
downside to this.
require_once('/Users/alanpinstein/dev/sandbox/showcase2/showcase2/
classes/dieselpoint/Java.inc');
// bridge side
java -server -Xmx1200m -Dphp.java.bridge.default_log_level=5 -jar /
path/to/JavaBridge.jar SERVLET:9676 2>$LOGFILE 1>$LOGFILE &
I read the docs just now on promiscuous mode and I am not certain I
understand what it does. I sort of see what it's used for, but it's
not really clear exactly what it does, and consequently, what
technically doesn't happen if it's not on.
In fact I have a nice wrapper script for starting/stopping a
standalone bridge (which frankly I think is really convenient for
people that aren't already running an app server). I will post the
script in a separate email if you want to use it in the project.
Alan
On Sep 13, 2009, at 5:45 PM, php-java-bridge-
us...@li... wrote: > Hi, > > Yes, if your back end rejects
the local fifo (in promi...
 | 
| 
      
      
      From: <php...@li...> - 2009-09-13 22:06:39
       | 
| > I have just looked at the code, pipes are NOT used if $this->host is  
> not
> 127.0.0.1.
Ok, well I am using that IP to connect to the bridge:
define ("JAVA_HOSTS", "127.0.0.1:9676");
> Why have you switched off the local channel in the back end if both
> components are running on the same machine?
I have no idea! There are so many options for the bridge that it is  
unfortunately a bit of information overload for me.
I have not worked heavily on the innards of server design, especially  
on UNIX, and frankly I don't have a very good understanding of how  
unix options such as pipe/socket/channels?/etc work. I really only  
understand it on the IP side.
I would be grateful if you could elucidate these for me, or point me  
to a good "guide" to them, or simply just tell me what to do :)
Right now I am just running the standalone server like so:
java -server -Xmx1200m -Dphp.java.bridge.default_log_level=5 -jar / 
path/to/JavaBridge.jar SERVLET:9676 2>$LOGFILE 1>$LOGFILE &
on the same machine as PHP.
In the near future I might have the Java server on a single instance  
and have 2 web servers both talk to the same java bridge server over IP.
Thanks!
Alan
>
> On Sep 13, 2009 11:45 PM, "Jost Bekemeier" <jos...@go... 
> >
> wrote:
>
> Hi,
>
> Yes, if your back end rejects the local fifo (in promiscuous mode),  
> Java.inc
> creates a new pair and tries again in the next request.
>
> The fifos are only used on security enhanced linux, please disable  
> them by
> setting JAVA_PIPE_DIR to null.
>
> Thank you very much for reporting this bug. -- It has been there  
> since 5
> years. I guess you are the first person who enabled promiscuous mode  
> in the
> back end w/o setting the host value in the front end.
>
> Regards,
> Jost Boekemeier
>
>>> On Sep 13, 2009 11:07 PM, <php...@li... 
>>> >
> wrote: > > Oops the imag...
>
> us...@li... wrote: > My /tmp directory ran out of  
> space (or
> inodes or something) to...
>
>>>> You can see that the bridge exhausted all inodes on /dev/shm then  
>>>> as >
>> soon as that was ful...
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
> 30-Day
> trial. Simplify your report design, integration and deployment - and  
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
 | 
| 
      
      
      From: <php...@li...> - 2009-09-13 22:18:35
       | 
| >> r SERVLET:9676
>
> SERVLET does set promiscuous mode. For local communication please use
> SERVLET_LOCAL.
Awesome! Just did that and bye-bye temp files. Thanks so much for the  
quick response.
> However, Java.inc should delete the fifo if the back end doesn't  
> want to use
> it, of course.
Of course! Glad I could help to find the bug.
Thanks again!
Alan
>
> On Sep 14, 2009 12:00 AM, <php-java-bridge- 
> us...@li...>
> wrote:
>
> Hi Jost-
>
> Glad to report the bug! Sadly I seem to be good at finding them ;)
>
> This is the *only* setup I use for getting the bridge going. If this
> either of these settings turns on promiscuous mode, I didn't do it on
> purpose.
>
> // PHP side (duh)
> define ("JAVA_HOSTS", "127.0.0.1:9676");
> define ("JAVA_PREFER_VALUES", true);    # required for BC with the way
> we wrote our php-java-bridge code. Could try to debug and fix but no
> downside to this.
> require_once('/Users/alanpinstein/dev/sandbox/showcase2/showcase2/
> classes/dieselpoint/Java.inc');
>
> // bridge side
> java -server -Xmx1200m -Dphp.java.bridge.default_log_level=5 -jar /
> path/to/JavaBridge.jar SERVLET:9676 2>$LOGFILE 1>$LOGFILE &
>
> I read the docs just now on promiscuous mode and I am not certain I
> understand what it does. I sort of see what it's used for, but it's
> not really clear exactly what it does, and consequently, what
> technically doesn't happen if it's not on.
>
> In fact I have a nice wrapper script for starting/stopping a
> standalone bridge (which frankly I think is really convenient for
> people that aren't already running an app server). I will post the
> script in a separate email if you want to use it in the project.
>
> Alan
>
> On Sep 13, 2009, at 5:45 PM, php-java-bridge-
>
> us...@li... wrote: > Hi, > > Yes, if your back end  
> rejects
> the local fifo (in promi...
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
> 30-Day
> trial. Simplify your report design, integration and deployment - and  
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
 |