Hello friends again...I am doing database project with help of perl and mysql. I am using DBIx and it's helping modules to perform the database operations like inserting in to database and all.Till now I was getting everything done correctly but since yesterday when I tried to run the script at the end of it's execution I used to an error like out of memory exception.The test log is as follows:

2010-03-30 10:18:35 Script started 2010-03-30 10:18:35 Date being processed: 2010_03_18 2010-03-30 10:18:35 Starting to gather data 2010-03-30 10:18:35 Gathering nightly data 2010-03-30 10:18:35 Reading data from http://some_web_site.com 2010-03-30 10:18:35 Creating an internal hash from the data 2010-03-30 12:32:10 Starting to load data into the database 2010-03-30 12:32:19 Inserting data to database

and in the output I am getting something like this :

[root@lcld0037 NightlyDB]# perl load_data_to_db.pl 2010_03_18 2010-03-30_10-18-35: Script started 2010-03-30_10-18-35: Date being processed: 2010_03_18 2010-03-30_10-18-35: Gathering nightly data . . . (287709)(562546)(562546)(562546)(562546)(562546)(275841)(476059)(47605 +9)(476059)(476059)(476059)(476059)(476059)(476059)(476059)(476059)(47 +6059)(476059)(476059)(476059)(476059)(476059)(476059)(476059)(476059) +(476059)(476059)(476059)(476059)(476059)(476059)(476059)(476059)(4760 +59)(476059)(233299)(339473)(339473)(649823)(649823)(649823)(649823)(6 +49823)(649823)(649823)(2203347)(2203347)(2203347)(2203347)(2203347)(2 +203347)(2203347)(2203347)(2203347)(2203347)(2203347)(2203347)(2203347 +)(2203347)(2203347)(2203347)(2203347)(2203347)(2203347)(2203347)(2203 +347)(2203347)(2203347)(2203347)(2203347)(2203347)(2203347)(2203347)(2 +203347)(2203347)(2095735)(2095735)(2095735)(2095735)(2095735)(2095735 +)(2095735)(2095735)(2095735)(2095735)(2095735)(2095735)(2095735)(2095 +735)(2095735)(2095735)(2095735)(2095735)(2095735)(2095735)(2095735)(2 +095735)(2095735)(2095735)(2095735)(2095735)(2095735)(2095735)(2095735 +)(2095735)(2095735)....# some random numberkeep on generating (15867513)2010-03-30_12-32-19: Inserting data to database Out of memory!

I have not changed anything in the Database Insertion script .Because the same script ran properly 2 days earlier.What is the cause of getting such exception then? Kindly tell me cause of the such exception.Also what am I supposed to do in order to get rid of such exception? Thanks in advance !!!!!

updated part of question:

I used DBIx::Class and do insertion procedure as follows in any of the table:

sub _insert_test_run { my ($self, $schema, $test_run_data) = @_; my $nightly_web_page_test_run_id = $test_run_data->{test_run_id}; my $test_controller_id = $self->_get_test_controller($schema, $test_run_data->{controll +er}); my $test_run_configuration = undef; #TO BE ADDED LATER my $start_date = $test_run_data->{start_date}; my $end_date = $test_run_data->{end_date}; my $elapsed_minutes = $test_run_data->{elapsed_minutes}; my $log_link = $test_run_data->{log_link}; my $test_run_rs = undef; eval { $test_run_rs = $schema->resultset("TestRun")->create( { nightly_web_page_test_run_id=> $nightly_web_page_test_ +run_id, test_controller_id => $test_controller_id, test_run_configuration_id => $test_run_configuration +, start_date => $start_date, end_date => $end_date, elapsed_time => $elapsed_minutes, log_link => $log_link, } ) || die "Unable to insert data to table TestRun: $!"; }; if($@) { #warn(); $self->log_writer()->write_error_row("Unable to insert data to + table TestRun: $@"); return undef; } else { return $test_run_rs; } }

In above example I am inserting in to test_run table


In reply to out of memory exception by siddheshsawant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.