Thursday, April 26, 2018

Laravel Throws SQLite error when I change from local Homestead to prod in AWS - development

Laravel Throws SQLite error when I change from local Homestead to prod in AWS

I have created an application that uses the Archon library for creating and manipulating dataframes, here’s the link(Great Library btw!).

The application will create a large array that contains duplicates. I am using the dataframe functionality of Archon to perform a groupBy operation, so that I get the count of each unique entry to the array.

This array varies from being a couple of hundred entries, to many thousand.

Locally, this works fine. I’m using Vagrant, with VirtualBox – and I have a Homestead Box running there. It is running on an Ubuntu 64 bit system.
I’ve recently deployed my application to an elastic beanstalk instance, and this is running on 64bit Amazon Linux/2.6.6.

After deploying, I’m receiving the error of

SQLSTATE[HY000]: General error: 1 too many SQL variables

So it seems like for some reason, after changing systems, the client interacts with the SQLite driver that Archon is built on differently. I’m at a loss as to why this would work locally, but not after deployment.

Here’s the code I’m using which produces the error:

$df = DataFrame::fromArray($batch_array);
$senders_emails = $df->query("SELECT a,sum(b) AS bFROM dataframe GROUP BY 1ORDER BY 2 DESC")->toArray();

Does anyone understand SQLite/Archon/Homestead vs EB well enough to help?
Would greatly appreciate!



from Laravel Questions and Answers https://laravelquestions.com/php/laravel-throws-sqlite-error-when-i-change-from-local-homestead-to-prod-in-aws/
via Lzo Media

No comments:

Post a Comment