|
I don't know much about the internal workings of Apache, but what are the strange happenings you speak of?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Thanks for taking the time to help.
There have been 2 things lately.
First I put together some PERL scripts and when I executed them with a system call "system(script-name agr1 arg2 ... argn)" the script seemed to time out after some undetermined amount of processing. The launched script is a long running script that in turn launches other scripts.
I figured it had something to do with the browser process timing out so I changed the launching script to use exec instead of system thus launching it in a different process and the launched script to be capable of running from the command line. Took out all stdin reads, stdout and stderr writes, logged everything to a file, etc.
Things worked for a few days and I was able to monitor the process via ps and also looking at the logs as the script progressed. As I mentioned, this script launches other scripts as the job progresses and usually two or three of these scripts complete and then the process fails.
I can't seem to find a common failure point as each day the script fails at a different point of completion but I haven't had a successful run of the entire process for about a week now.
I designed the process, when having trouble launching from a browser, so as long as the first script completes I can restart the process from point of failure so I am able to manually complete all the processing if I take it a bit at a time. This seems to rule out a data anomaly but I am thinking there may be a process anomaly that is causing the process to fail when certain state is present. I am looking into making the scripts more bulletproof.
That's the first problem.
The second problem is when I tried to simulate crontab on the cheap. My web hosting package does not support cron and to upgrade to a package that does would be considerably more expensive (US$3.99/mo to US$9.99/mo).
Not to worry I think, I'm a developer, I can launch a process that checks a simulated queue (schedule file), sleeps for a predetermined interval and checks the queue again. After a reasonable amount of time (24 hours) it launches another copy of itself and the launched process sends a kill signal to get rid of the expiring process. That way I don't run into a problem where any process executes for too long and gets killed by the sysadmin thinking it is a stalled process.
So I put together a proof of concept script that does nothing else but write a time stamp message to a log file, sleeps for 1 minute and writes another time stamp message, etc. for 24 hours. This process seems to die after 10 or 15 minutes. Again I can't seem to get a consistent point where it is failing.
In theory I could set it up to live for at most 5 minutes and kick off it's replacement but I would rather solve the problem because I think both problems have a common cause. Hopefully by solving one I will solve both of them.
Any thoughts would be greatly appreciated.
|
|
|
|
|
Been a long time since I've done anything with PERL. I'd look through all of the calling scripts and see where it is conking out. I'd maybe look at just ramping up to 9.99/mo for the ability to run cron jobs, but you need to justify if that is a feasible route to go. Sorry I wasn't of too much help.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Thanks for looking into it.
Paul Conrad wrote: 'd maybe look at just ramping up to 9.99/mo for the ability to run cron jobs
If I thought it would solve all my problems I would. I could reorganize 2 lower priced hosting packages ($7.98 combined) into one with a certificate ($9.99) which would enable me to update crontab via ssh but that would only solve the crontab simulation problem and I would still have the other, daily backup, script problem.
Thanks again for the help.
|
|
|
|
|
I thought the Apache website itself had a large resource for stuff like that. It's been a few years since I have used Apache though.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Hi leckey,
Thanks for replying.
Please read my post to Paul above and if you have any thoughts about how to approach this please let me know.
|
|
|
|
|
Just quickly looking at your problem (I'll try to look at it more tonight at home)I unfortunately don't have an idea off the top of my head. Have you tried moving the entire system to another box to see if it still has the same issues?
Are you using an metabase XML file? There is a value in there called "CGI Timeout" that needs increasing.
-- modified at 17:50 Thursday 12th July, 2007
Also what versions of Perl and Apache are you running?
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Hi lackey,
Thanks for the insight.
leckey wrote: Are you using an metabase XML file? There is a value in there called "CGI Timeout" that needs increasing.
I will look into that in the morning.
|
|
|
|
|
leckey wrote: There is a value in there called "CGI Timeout" that needs increasing.
Looks like this is what is causing my problems. Here is something I came across when I was looking at CGI script guidelines.
Please optimize your scripts relative to memory usage and <br />
CPU time. Our system automatically stops scripts that use too many system <br />
resources. <br />
<br />
Programming Limits: <br />
CPU : 6 seconds @ 100%<br />
Memory : 10240KB (10MB)<br />
Numerical Processes : 12
The reason the backup scripts were varying widely is that I have a random (within a range) wait programmed into the main loops of all the scripts.
I do this to insure that I don't get scripts executing in lock step hitting resources like a synchronized artillery barrage.
By making the process sleep for a random interval with a range (i.e. randomly between 3 and 15 seconds), I insure that even two simultaneous executions of the same script against different db tables do not synchronize.
In fact two executions of the same script against the same resource (for example a daily backup two days in a row) will take a different amounts of time to complete processing.
That solves the backup script anomaly.
As for the proof of concept scheduler I am thinking that it sometimes got further because of other scripts that were competing for resources at the time of execution.
In any case the limits set down are the ones I need to live with. At least now I know what is at play and can break up the processing accordingly.
Thanks for helping to solve this problem for me. I was at my wits end trying to understand what was going on.
|
|
|
|
|
Glad I could help...especially since I haven't worked with Apache since I started grad school in 2004!
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Howzit guys.
I have this code with a connection to the database.The code is suppose to create and dropdownlist and automatically populate it with values from the database, then display everything on the page.(The dropdown with values)
Problem is, when I run I only get this "Dynamic dropdown lists using Active Server Pages and Microsoft Access
Below is an example of a drop down list, dynamically populated from
a database table."
Then the values are not shown.Is there a setting on my Macromedia that I need to enable to allow database values or Im missing something.
here is the code:
Please guys, I have till this next week monday to get this rite
<%@LANGUAGE="VBSCRIPT" %>
<%
Option Explicit
Dim objConn
Dim objRS
Dim objRS2
Dim strSQL
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objRS2 = Server.CreateObject("ADODB.Recordset")
objConn.ConnectionString = Server.MapPath("dropdowns.mdb")
objConn.Provider = "Microsoft.Jet.OLEDB.4.0"
objConn.Open
'-- Sub Procedure that builds the dropdown list.
'-- Parameters c, r and table are passed when the sub is built.
Sub showDropDownList(c, r, table)
'-- SQL Statement
strSQL = "SELECT * FROM " & tblDropDownTest & " ORDER BY Title ASC"
'-- Execute our SQL statement and store the recordset
Set r = c.Execute(strSQL)
'-- START MAIN CODE BLOCK
'-- If we have records to return
if not r.eof = false then
'-- Open a form/select tag
'-- This particular example has no action attribute, which would normally...
'-- ...be required in order to post the data to another page for processing.
Response.Write " "
Response.Write "" & vbCrLf
Response.Write "Choose...."
'-- loop and build each database entry as a selectable option
While r.EOF = false
Response.Write ""
_ & r.Fields("Title").Value & "" & vbCrLf
'-- Move recordset to the next value
r.movenext
Wend
end if
'--END OF MAIN CODE BLOCK
'-- close select/form tags
Response. Write "" & vbCrLf
End Sub
%>
<title>
Dynamic dropdown lists using Active Server Pages and Microsoft Access
Below is an example of a drop down list, dynamically populated from
a database table.
<%
' -- Call the sub procedure to build the drop down list, with the connection
and recordset objects and the source table (In quotes).
call showDropDownList(objConn, objRS, "tblDropDownTest")
%>
kagiso
|
|
|
|
|
|
How do add and use a .net class library in Asp?
|
|
|
|
|
pranu_13 wrote: How do add and use a .net class library in Asp?
ASP.NET or ASP?
|
|
|
|
|
|
Not going to happen, unless it happens via COM. .NET libraries do not support COM by default.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I'm using System.Net.WebClient to upload files to my server. The client is a windows application, not a web app. I've attempted to POST to my aspx page using two methods in the WebClient class. The first UploadFileAsync works well, unless I POST a file larger than 4 mb. Here is the code in the aspx page to receive the posted file:
foreach (string f in Request.Files.AllKeys)<br />
{<br />
HttpPostedFile file = Request.Files[f];<br />
file.SaveAs("c:\\inetpub\\test\\UploadedFiles\\" + file.FileName);<br />
}
So I thought I would try using UploadDataAsynch instead to see if there is a similar issue with the size of the POST. My problem is that I don't know exactly how to receive the data in the POST on the web page and write it to file on the server when using UploadDataAsynch. I'm sure it is very simple code but it's eluding me at the moment. If any one has a suggestion, I'd appreciate it.
|
|
|
|
|
Ah problem solved. I can upload larger files with UploadFileAsych, I simply needed to override the default setting of 4mb in the system.web section of my web.config by setting this:
<httpRuntime maxRequestLength="10240" >
Here is the kb if anyone is interested.:
http://support.microsoft.com/kb/295626[^]
|
|
|
|
|
Using "classic" ASP
I want to retrieve properties of a HTML element with vbscript. This is what I've tried, but it generates a "Object required" error:
<form id="spanForm" name="spanForm" action="#">
<input id="screenSpanWidth" name="screenSpanWidth" type="hidden" />
</form>
<script language='JavaScript' type='text/javascript'>
document.forms['spanForm'].screenSpanWidth.value = var_nScreenWidth.toString();
</script>
<%
Dim nUserScreenWidth
nUserScreenWidth = Document.forms.namedItem("spanForm").screenSpanWidth.value '<--error here
%>
I've verified that the value is in fact being set (via firebug), but when I run the asp page, I get the "object required" error.
-- modified at 8:00 Friday 13th July, 2007
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
hey guys, this is most likely the wrong place, and i know ABSOLUTELY NOTHING about html / forum code and what not. any ways, im trying to format my user name(with color, subscrpt, etc), and im trying this :
[color=#800517]V[color=black][sub]on[/sub][color=#800517]H[color=black][sub]ag[/sub][color=#800517]ND[color=black][sub]az[/sub][/color]
apparently my attempts mess up the layout in the soapbox, and i cant fix it by changing my name back
am i using the wrong codes? and if so, where are the correct codes for me to mess around with?
[Insert Witty Sig Here]
|
|
|
|
|
The key is to not use html in your ID...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
It would be nice if you deleted the posts you made using the corrupt user name, since the last one in the SB seems to have corrupted the thread and its predecessor thread. In the future, it would be more polite to do your testing on your own profile message board first...
Use of HTML in usernames has caused nothing but trouble in the past, and IMO is not justified except in support of non-english spelling. I would vote for it being banned entirely.
|
|
|
|
|
slow down buddy... i checked the preview, it looked fine, no crashes, i post once in the SB and all hell broke loose. i couldnt respond, i couldnt delete, i could do nothing... if i could delete them, i would; however, i cant see anything from that thread down...
--------------------
Insert Witty Sig Here __________
|
|
|
|
|
I edit sigs that blow up the forums, and it's almost 100% because they are not XHTML. Make sure you close all your tags, and do it in order.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i want to know about .net remoting and .net webservicing in a simple way.
1. what are they and how to use in asp.net
2. how to create webservicing?
3. what is advantage over .net remoting?
4.what i have write in server and client side?
5. can i use this method if some of my clients stores data in mysql for the part of application and rest in oracle. change in data of some tables in mysql will effect the change in corresponding master table in oracle and visa versa?
can anybody say me the good website available regarding the articles of .net remoting and .webservice.
vijaya
|
|
|
|