Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6160443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:18:11+00:00 2026-05-23T21:18:11+00:00

It is possible that my question title is misleading, but here goes — I

  • 0

It is possible that my question title is misleading, but here goes —

I am trying out a prototype app which involves three MySQL/Perl Dancer powered web apps.

The user goes to app A which serves up a Google maps base layer. On document ready, app A makes three jQuery ajax calls — two to app B like so

    http://app_B/points.json
    http://app_B/polys.json

and one to app C

    http://app_C/polys.json

Apps B and C query the MySQL database via DBI, and serve up json packets of points and polys that are rendered in the user’s browser.

All three apps are proxied through Apache to Perl Starman running via plackup started like so

    $ plackup -E production -s Starman -w 10 -p 5000 path/to/app_A/app.pl
    $ plackup -E production -s Starman -w 10 -p 5001 path/to/app_B/app.pl
    $ plackup -E production -s Starman -w 10 -p 5002 path/to/app_C/app.pl

From time to time, I start getting errors back from the apps called via Ajax. The initial symptoms were

    {"error":"Warning caught during route 
     execution: DBD::mysql::st fetchall_arrayref 
     failed: fetch() without execute() at 
     <path/to/app_B/app.pm> line 79.\n"}

The offending lines are

    71> my $sql = qq{
    72>     ..
    73>
    74>
    75> };
    76> 
    77> my $sth = $dbh->prepare($sql);
    78> $sth->execute();
    79> my $res = $sth->fetchall_arrayref({});

This is bizarre… how can execute() not take place above? Perl doesn’t have a habit of jumping over lines, does it? So, I turned on DBI_TRACE

    $DBI_TRACE=2=logs/dbi.log plackup -E production -p 5001 -s Starman -w 

10 -a bin/app.pl

And, following is what stood out to me as the potential culprit in the log file

    > Handle is not in asynchronous mode error 2000 recorded: Handle is 
    > not in asynchronous mode
    >    !! ERROR: 2000 CLEARED by call to fetch method

What is going on? Basically, as is, app A is non-functional because the other apps don’t return data “reliably” — I put that in quotes because they do work correctly occasionally, so I know I don’t have any logic or syntax errors in my code. I have some kind of intrinsic plumbing errors.

I did find the following on DBD::mysql about ASYNCHRONOUS_QUERIES and am wondering if this is the cause and the solution of my problem. Essentially, if I want async queries, I have to add {async => 1} to my $dbh-prepare(). Except, I am not sure if I want async true or false. I tried it, it and it doesn’t seem to help.

I would love to learn what is going on here, and what is the right way to solve this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:18:16+00:00Added an answer on May 23, 2026 at 9:18 pm

    How are you managing your database handles? If you are opening a connection before starman forks your code then multiple children may be trying to share one database handle and are confusing MySQL. You can solve this problem by always running a DBI->connect in your methods that talk to the database, but that can be inefficient. Many people switch over to some sort of connection pool, but I have no direct experience with any of them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's possible that this question has already been asked, but I can't seem to
This is more of a cryptography theory question, but is it possible that the
Here's a restatement of the rather cryptic title question: Suppose we have a Prototype
Possible Duplicate: String comparison in Objective-C I realize that the question is not very
Question So I've recently came up with some new possible projects that would have
I don't know if this is too specific a question, if that is possible,
Question: Is it possible to construct a web page that has a script to
Question 1: Is is possible to throw an exception that will not be caught
A Castle Windsor question: Is it possible to register a class that has an
Following this question, it seems that it is possible to open a file from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.