An internal error occurred while trying to spawn the application.
Exception type: Passenger::SecurityException
Error message: Line too long
Backtrace:
in 'std::string Passenger::ApplicationPool2::Spawner::readMessageLine(Details&) [with Details = Passenger::ApplicationPool2::SmartSpawner::StartupDetails; std::string = std::basic_string<char>]' (Spawner.h:718)
in 'std::string Passenger::ApplicationPool2::SmartSpawner::negotiatePreloaderStartup(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:558)
in 'void Passenger::ApplicationPool2::SmartSpawner::startPreloader()' (SmartSpawner.h:206)
in 'virtual Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::SmartSpawner::spawn(const Passenger::ApplicationPool2::Options&)' (SmartSpawner.h:744)
in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned int)' (Implementation.cpp:782)
When looking at apache's error logs.
[ 2013-10-22 11:47:40.0484 26380/7fb124a58700 Pool2/Spawner.h:738 ]: [App 26425 stdout] ***** REQUEST: https://na12.salesforce.com/services/data/v22.0/sobjects/Account/describe
[ 2013-10-22 11:47:40.4836 26380/7fb124a58700 Pool2/Implementation.cpp:849 ]: Could not spawn process for group /var/www/invoices-rails/current#default: Line too long
in 'std::string Passenger::ApplicationPool2::Spawner::readMessageLine(Details&) [with Details = Passenger::ApplicationPool2::SmartSpawner::StartupDetails; std::string = std::basic_string<char>]' (Spawner.h:718)
in 'std::string Passenger::ApplicationPool2::SmartSpawner::negotiatePreloaderStartup(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:558)
in 'void Passenger::ApplicationPool2::SmartSpawner::startPreloader()' (SmartSpawner.h:206)
in 'virtual Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::SmartSpawner::spawn(const Passenger::ApplicationPool2::Options&)' (SmartSpawner.h:744)
in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned int)' (Implementation.cpp:782)
Which seems to indicate that the response, or the request for the Account describe is a 'Line too long'.
The response from salesforce on my development machine comes to 41858 characters with spaces and no newlines.
Searching passenger's code for the error, I only found two places in which it occurs ( likely called from a variety of places in the code).
static pair<unsigned int, bool> newlineFound(const char *data,
unsigned int size, string *output, unsigned int max)
{
const char *newline = (const char *) memchr(data, '\n', size);
if (newline != NULL) {
unsigned int accepted = newline - data + 1;
if (output->size() + accepted > max) {
throw SecurityException("Line too long");
}
output->append(data, accepted);
return make_pair(accepted, true);
} else {
if (output->size() + size > max) {
throw SecurityException("Line too long");
}
output->append(data, size);
return make_pair(size, false);
}
}
string readLine(unsigned int max = 1024, unsigned long long *timeout = NULL) {
string output;
readUntil(boost::bind(newlineFound, _1, _2, &output, max), timeout);
return output;
}
This seems to indicate that passenger thinks no line should be over 1024 characters.What would anyone suggest I do to get around this? I'm open to any setup changes or options which could work. Do I need to recompile passenger with a higher limit? Serve pages without Apache/Passenger? The app works on heroku.
I have the same problem. But I do not understand the point 2. Explain what to do. How you want to edit bashrc?