Index: trunk/pstamp/scripts/pstampparse.pl
===================================================================
--- trunk/pstamp/scripts/pstampparse.pl	(revision 36594)
+++ trunk/pstamp/scripts/pstampparse.pl	(revision 36595)
@@ -243,5 +243,7 @@
 my $watch_for_big_requests = (!($label =~ /BIG/) and ($label =~ /PSI/ or $label =~ /WEB/));
 
-my $big_limit = 100;    # XXX: this should be in a configuration file somewhere not hard coded
+# XXX: these should be in a configuration file somewhere not hard coded
+my $big_limit = 100;
+my $job_big_limit = 400;
 
 if ($watch_for_big_requests and $nRows > $big_limit) {
@@ -267,5 +269,5 @@
 
     # see whether number of jobs limit for high priority request was exceeded
-    if ($watch_for_big_requests and $num_jobs > $big_limit) {
+    if ($watch_for_big_requests and $num_jobs > $job_big_limit) {
         $label = change_to_lower_priority_label($label);
         $watch_for_big_requests = 0;
@@ -311,4 +313,5 @@
     my $rownum   = $row->{ROWNUM};
     if (!validID($rownum)) {
+	$rownum = 'NULL' if !defined $rownum;
         print STDERR "$rownum is not a valid ROWNUM\n";
         insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
@@ -316,5 +319,6 @@
     }
     my $job_type = $row->{JOB_TYPE};
-    if (($job_type ne "stamp") and ($job_type ne "get_image")) {
+    if (!defined $job_type || (($job_type ne "stamp") and ($job_type ne "get_image"))) {
+    	$job_type = 'NULL' if !defined $job_type;
         print STDERR "$job_type is not a valid JOB_TYPE\n";
         insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
@@ -325,4 +329,5 @@
     if (($req_type ne "byid") and ($req_type ne "bycoord") and ($req_type ne "byexp") and
         ($req_type ne "byskycell") and ($req_type ne "bydiff")) {
+	$req_type = 'NULL' if !defined $req_type;
         print STDERR "$req_type is not a valid REQ_TYPE\n";
         insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
