I have a loop appending futures of create document and then waiting until they all complete. The first one always completes. For the 2nd through 4th, I may get one or two, but never all three. I get a generic server error 500. Here is my code
Future<List<dynamic>> SaveFacility() async {
Map<String, dynamic> ourData = {
'facility_name': facilityName,
'facility_building': facilityBuilding,
'facility_room': facilityRoom,
'grid_height': gridHeight,
'grid_width': gridWidth,
};
List<Future> theFutureList = [];
theFutureList.add(
_manageSession.createDocument(ourData, "63eefc630814627ea850"));
for (int theIndex = 0; theIndex < rackList.length; theIndex++) {
Map<String, dynamic> theRackMap = {
'relative_position': rackList[theIndex].relativePosition,
'absolute_position': rackList[theIndex].absolutePosition,
'facility_name': facilityName,
};
theFutureList.add(
_manageSession.createDocument(theRackMap, "63ef152596e8de3a0033"));
}
return Future.wait(theFutureList);
}
I think I got this working. I enclosed the futurelist.add inside a future delayed command. If this is indeed the case, it implies there is some limit to how quickly one can send commands to the server. If that is the case, the error should be more informative.
When you get a 500 error, you'll have to check the docker logs for the appwrite container to see the underlying error
You mean the docker.log on the host or are there specific docker logs for each container, also on the host or contained within the container itself?
There are logs for each container. I was referring to the logs for the appwrite container
Which container would be the one returning this error? There are more than a dozen.
appwrite
[SOLVED] What might be causing a generic server error?
Recommended threads
- Bulk API limitations in self-hosted serv...
Environment: Appwrite Selfhost SDK: node-appwrite 28.0 Calling `upsertRows` (also applies to `createRows`/`updateRows`/`deleteRows`) with more than 100 rows fa...
- Self Hosted GitHub connection not adding...
After upgrading to 1.9.6 i noticed that i cannot search for new repositories when trying to add new functions. I removed the existing github connection via Set...
- Unable to init function via cli
Hello! I have created a new self hosted instance of appwrite 1.9.6 and have connected to that insatnce with the cli 27.2.0 that was released a few hours ago. Wh...