New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems using bench-rest with Dreamfactory #12
Comments
David, That is strange. Nothing from what you described sounds out of the ordinary. I can certainly take a closer look and see if I can determine what is going on. You can email me at jeff.barczewski@gmail.com with credentials and anything I need to know beyond what is in this issue. Thanks, Jeff |
David, It looks like the REST service you are hitting is expecting an "Accept" header which is an optional HTTP header. Without the Accept header the service is actually responding with a 500 error. If you add in the Accept header then it seems to work fine. bench-rest only sets the header Connection: keep-alive by default, however you can pass in a headers object in the flow definition to have it add whatever. If you want to do it from the command line you could do the request as follows (or add it to a flow.json and just refer to that file from the command line instead of the url). bench-rest -u xxx -p xxx -e "{ get: 'http://YOURURL', headers: { Accept: '*/*' }}" Ideally the REST service shouldn't require the Accept header since it is optional (implies I guess the tools you were using were automatically adding the Accept: Hope that explains things and gets you going. All the best, Jeff |
That is indeed it! Thanks Jeff! I'll get with the primary developers about that. Thanks again! |
You are quite welcome. I am glad I was able to help. |
I've got another strange one.... for some reason, after I successfully Not a biggie, I can work around that by just creating the table before Dave Jeff Barczewski wrote:
Dave Weiner | Sr. Software Engineer | DreamFactory | t.678 536.9244 |
Do you have the accept header in each item of the flow? Each of those is separate? |
Yup! Record inserts are working, so I'm not too worried about it, but Dave Jeff Barczewski wrote:
Dave Weiner | Sr. Software Engineer | DreamFactory | t.678 536.9244 |
I can take a quick look if you want to send me the details. |
I just sent you an email regarding that. I think it was due to slightly wrong syntax in your flow for the headers. It takes an object not an array of objects. After fixing that everything seems to work without errors for me. |
I am attempting to use bench-rest to benchmark the performance of Dreamfactory (https://github.com/dreamfactorysoftware/dreamfactory). When I use other tools such as curl, Advanced Rest Client or our built in test tool, I am able to connect to the REST api and perform any action. However, even the simplest actions, such as getting a list of database tables fails when using bench-rest with a 500 error. Using other tools, I get the expected response:
{
"resource": [
{
"name": "test_table"
}
]
}
Using the simple get request capabilities of bench-rest, this is the result (username and password obfuscated)
bench-rest -u XXX -p XXX http://52.20.104.223/api/v2/DBTest/_table
Benchmarking 1 iteration(s) using up to 1 concurrent connections using basic auth user davidweiner@dreamfactory.com
flow: http://52.20.104.223/api/v2/DBTest/_table
Failed in main, err: [Error: error statusCode: 500]
Progress [=======================================] 100% 0.0s conc:0 4/s
errors: 1
stats: { totalElapsed: 282.82533200085163,
main:
{ meter:
{ mean: 3.5350537770750914,
count: 1,
currentRate: 3.5350037788768995,
'1MinuteRate': 0,
'5MinuteRate': 0,
'15MinuteRate': 0 },
histogram:
{ min: 279.80505799874663,
max: 279.80505799874663,
sum: 279.80505799874663,
variance: null,
mean: 279.80505799874663,
stddev: 0,
count: 1,
median: 279.80505799874663,
p75: 279.80505799874663,
p95: 279.80505799874663,
p99: 279.80505799874663,
p999: 279.80505799874663 } } }
Using the exact same credentials and URL, both cURL, Advanced Rest Client and our own REST test application all work and return the list of tables. I've used wireshark to sniff the connection, and I can't see any significant differences between it and the cURL request.
I would be happy to provide you with the proper credentials to troubleshoot this. I'm fresh out of ideas and would appreciate any insight you could provide.
The text was updated successfully, but these errors were encountered: